You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by ap...@dsl.pipex.com on 2010/09/06 18:28:01 UTC

How to use Lucene for getting tags for tagcloud?

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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


RE: How to use Lucene for getting tags for tagcloud?

Posted by Uwe Schindler <uw...@thetaphi.de>.
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: uwe@thetaphi.de


> -----Original Message-----
> From: Ian Lea [mailto:ian.lea@gmail.com]
> Sent: Monday, September 06, 2010 6:41 PM
> To: java-user@lucene.apache.org
> 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,  <ap...@dsl.pipex.com> 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: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: How to use Lucene for getting tags for tagcloud?

Posted by Ian Lea <ia...@gmail.com>.
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,  <ap...@dsl.pipex.com> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org