If you want the tag clound for the *whole* index (not only the results of a specific query), its easy: Iterate over Term(s)Enum for the specific field, you are interested in, and get the docFreq of each term.
----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: [email protected] > -----Original Message----- > From: Ian Lea [mailto:[email protected]] > Sent: Monday, September 06, 2010 6:41 PM > To: [email protected] > Subject: Re: How to use Lucene for getting tags for tagcloud? > > Sounds like you want facets. Google "lucene facets" or browse back through > the archives of this list - there was some discussion quite recently. Or use Solr > which will do pretty much all of it for you. > > > -- > Ian. > > > On Mon, Sep 6, 2010 at 5:28 PM, <[email protected]> wrote: > > Hello > > > > I'm a Lucene newbie and I have it working where I can create an index > > from a column of a database table storing tags, and search this index > > for a particular tag and display the results and their scores. I'm looking at this > as an alternative to a MySQL fulltext index which I've heard mixed comments > about. > > > > But, what I want is to get from the most popular tags in the index > > along with their counts and then use this data to create a tagcloud. > > > > Does anyone know if and how Lucene can be queried to get the most popular > tags in an index and their counts at all? > > > > Thanks > > > > Mr Morgan. > > > > -- > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
