There is a class for doing that in contrib/miscellaneous I think, though it too 
probably loops through TermEnum.


Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: Cam Bazz <[EMAIL PROTECTED]>
> To: java-user@lucene.apache.org
> Sent: Tuesday, August 12, 2008 7:39:40 PM
> Subject: top terms
> 
> hello,
> 
> how do we get the terms with the highest frequency for a given field?
> 
> I know one can TermEnum terms = searcher.getIndexReader().terms() then,
> iterate over it and filter the fields required and count them,
> but is there a way to get lets say top 50 terms for a given field without
> iterating?
> 
> Best Regards,
> -C.B.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • top terms Cam Bazz
    • Re: top terms Otis Gospodnetic

Reply via email to