You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Alex Benjamen <ab...@friendster.com> on 2008/02/29 04:22:38 UTC

Top N terms of an indexed field

I was wondering if it is possible to retrieve the top 20 terms for a given 
fields in an index. 
 
For example, if we're indexing user profile data and one of the fields 
is "interests" - it would be great to get the top 20 terms for interests
found in the index. 
 
-Alex

Re: Top N terms of an indexed field

Posted by Ryan McKinley <ry...@gmail.com>.
Alex Benjamen wrote:
> I was wondering if it is possible to retrieve the top 20 terms for a given 
> fields in an index. 
>  
> For example, if we're indexing user profile data and one of the fields 
> is "interests" - it would be great to get the top 20 terms for interests
> found in the index. 
>  

check out faceting
http://wiki.apache.org/solr/SimpleFacetParameters

if you want it across all documents, use the query *:*

ryan