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 Ganesh <em...@yahoo.co.in> on 2011/02/23 10:00:03 UTC

Facet search

Hello all,

I am using Lucene for my project and we have new requirement  to present data in the form of Analytics. Facet could be used for that but for this purpose i don't want to migrate to Solr. How to acheive this with Lucene. Will facet feature be part of future release of Lucene? 

We require results in the below fashion. Top 3 results in each column.

Top users                 Country                 PageAccessed     
UserA (100)             India (1000)           /Articles/abc (200)
UserB (100)             US(500)                 /Articles/xyz (200)
UserC (100)             Russia(200)            /Articles/aaa (100)

When click on particular user, the results should be grouped for that User.
Top users                 Country                 PageAccessed     
UserA (100)             India (100)           /Articles/abc (55)
                                US(50)                 /Articles/xyz (25)
                                                             /Articles/aaa (10)

Regards
Ganesh
Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php

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


Re: Facet search

Posted by Tommaso Teofili <to...@gmail.com>.
+1 (I've just crossed path with a Lucene faceting requirement)
Tommaso

2011/2/23 Uwe Schindler <uw...@thetaphi.de>

> Strong +1!!!
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
> > -----Original Message-----
> > From: Simon Willnauer [mailto:simon.willnauer@googlemail.com]
> > Sent: Wednesday, February 23, 2011 10:31 AM
> > To: java-user@lucene.apache.org
> > Cc: java-dev
> > Subject: Re: Facet search
> >
> > This is another indicator that we should really try to extract Solr's
> capabilities
> > like Faceting into modules! Solr should not be required if you want to
> use the
> > facteing stuff we already have.
> >
> > simon
> >
> > On Wed, Feb 23, 2011 at 10:06 AM, Wouter Heijke <wh...@xs4all.nl>
> > wrote:
> > > Hi,
> > > Same here, don't want Solr, so if you want facets BoBo is your friend!
> > >
> > > http://sna-projects.com/bobo/
> > >
> > > Works great, very easy to use...the only thing is the name, is like
> > > dog food :-) But give BoBo a try!
> > >
> > > Wouter
> > >
> > >> Hello all,
> > >>
> > >> I am using Lucene for my project and we have new requirement  to
> > >> present data in the form of Analytics. Facet could be used for that
> > >> but for this purpose i don't want to migrate to Solr. How to acheive
> this
> > with Lucene.
> > >> Will facet feature be part of future release of Lucene?
> > >>
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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: dev-unsubscribe@lucene.apache.org For additional
> > commands, e-mail: dev-help@lucene.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

RE: Facet search

Posted by Uwe Schindler <uw...@thetaphi.de>.
Strong +1!!!

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: Simon Willnauer [mailto:simon.willnauer@googlemail.com]
> Sent: Wednesday, February 23, 2011 10:31 AM
> To: java-user@lucene.apache.org
> Cc: java-dev
> Subject: Re: Facet search
> 
> This is another indicator that we should really try to extract Solr's capabilities
> like Faceting into modules! Solr should not be required if you want to use the
> facteing stuff we already have.
> 
> simon
> 
> On Wed, Feb 23, 2011 at 10:06 AM, Wouter Heijke <wh...@xs4all.nl>
> wrote:
> > Hi,
> > Same here, don't want Solr, so if you want facets BoBo is your friend!
> >
> > http://sna-projects.com/bobo/
> >
> > Works great, very easy to use...the only thing is the name, is like
> > dog food :-) But give BoBo a try!
> >
> > Wouter
> >
> >> Hello all,
> >>
> >> I am using Lucene for my project and we have new requirement  to
> >> present data in the form of Analytics. Facet could be used for that
> >> but for this purpose i don't want to migrate to Solr. How to acheive this
> with Lucene.
> >> Will facet feature be part of future release of Lucene?
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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: dev-unsubscribe@lucene.apache.org For additional
> commands, e-mail: dev-help@lucene.apache.org



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


Re: Re: Facet search

Posted by Ganesh <em...@yahoo.co.in>.
My requirement is, I want to display the Top Terms with their count for every field. I am having 10 fields and in Each field Top 3 terms with their count should be displayed. When User selects any term then the search will be performed to filter the results. 

I could use term vector and enumurate the term freqeuncy and sort it but it may be time consuming task.  

Field_1                   Field_2                     Field_N  
Term_1_1(100)     Term_2_1(389)       Term_N_1(216)
Term_1_2(78)      Term_2_2(134)        Term_N_2(156)
Term_1_3(56)      Term_2_3(78)          Term_N_3(89)

Sample:
-------------
Top users                 Country                 PageAccessed     
UserA (100)             India (1000)           /Articles/abc (200)
UserB (100)             US(500)                 /Articles/xyz (200)
UserC (100)             Russia(200)            /Articles/aaa (100)

When click on particular user, the results should be grouped for that User.
Top users                 Country                 PageAccessed     
UserA (100)             India (100)           /Articles/abc (55)
                                US(50)                 /Articles/xyz (25)
                                                             /Articles/aaa (10)
Regards
Ganesh


----- Original Message ----- 
From: "Chris Hostetter" <ho...@fucit.org>
To: "Lucene Users" <ja...@lucene.apache.org>
Sent: Thursday, February 24, 2011 7:29 AM
Subject: [Bulk] Re: Facet search


> 
> : This is another indicator that we should really try to extract Solr's
> : capabilities like Faceting into modules! Solr should not be required
> : if you want to use the facteing stuff we already have.
> 
> the most basic logic of (field) faceting used by solr is simple TermEnum 
> iteration and document set intersection.  Any Lucene application can do 
> that w/o really refactoring any code out of Solr.  it's very straight 
> forward.
> 
> The real value adds that solr provides are:
> 
> * DocSet caching and cache warming which solr can do for you because it 
> knows when index changes (because it manages all the writes and reader 
> reopening).  
> * select alternate facet algorithms based on schema knowledge -- looking 
> at field types and value cardinality to determine when FieldCache or 
> UnInvertedField would be more efficient then TermEnumeration and DocSets
> * acurate counts when doing distributed searching
> 
> This aren't things that seem like they could really be extracted in a very 
> reusable manner -- the pre-requisets and scaffolding you'd need to 
> setup and use these pieces in a meaningful way outside of solr would 
> probably wind up being just like solr.
> 
> There are however lots of pieces that oculd be extracted and reused -- but 
> those things have allready been started/discussed (DocSets, hooks for 
> generic caches that are notified when IndexReaders are reopened, or 
> segments are changed, multivalue support in FieldCache, etc...)
> 
> : >> I am using Lucene for my project and we have new requirement to present
> : >> data in the form of Analytics. Facet could be used for that but for this
> 
> thats kind of a vague requirement -- if you can elaborate a bit on what 
> types of info you actaully want to compute/return, there may be a very 
> straightforward way to do it.  
> 
> like i said: the basics of faceting over all terms in a field is *really* 
> trivial ... the original implementation in Solr was about 40 lines of 
> code...
> 
> http://svn.apache.org/viewvc/incubator/solr/trunk/src/java/org/apache/solr/request/SimpleFacets.java?view=markup&pathrev=441175#l163
> 
> 
> -Hoss
>


--------------------------------------------------------------------------------


> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php

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


Re: Facet search

Posted by Chris Hostetter <ho...@fucit.org>.
: This is another indicator that we should really try to extract Solr's
: capabilities like Faceting into modules! Solr should not be required
: if you want to use the facteing stuff we already have.

the most basic logic of (field) faceting used by solr is simple TermEnum 
iteration and document set intersection.  Any Lucene application can do 
that w/o really refactoring any code out of Solr.  it's very straight 
forward.

The real value adds that solr provides are:

 * DocSet caching and cache warming which solr can do for you because it 
knows when index changes (because it manages all the writes and reader 
reopening).  
 * select alternate facet algorithms based on schema knowledge -- looking 
at field types and value cardinality to determine when FieldCache or 
UnInvertedField would be more efficient then TermEnumeration and DocSets
 * acurate counts when doing distributed searching

This aren't things that seem like they could really be extracted in a very 
reusable manner -- the pre-requisets and scaffolding you'd need to 
setup and use these pieces in a meaningful way outside of solr would 
probably wind up being just like solr.

There are however lots of pieces that oculd be extracted and reused -- but 
those things have allready been started/discussed (DocSets, hooks for 
generic caches that are notified when IndexReaders are reopened, or 
segments are changed, multivalue support in FieldCache, etc...)

: >> I am using Lucene for my project and we have new requirement  to present
: >> data in the form of Analytics. Facet could be used for that but for this

thats kind of a vague requirement -- if you can elaborate a bit on what 
types of info you actaully want to compute/return, there may be a very 
straightforward way to do it.  

like i said: the basics of faceting over all terms in a field is *really* 
trivial ... the original implementation in Solr was about 40 lines of 
code...

http://svn.apache.org/viewvc/incubator/solr/trunk/src/java/org/apache/solr/request/SimpleFacets.java?view=markup&pathrev=441175#l163


-Hoss

Re: Facet search

Posted by Simon Willnauer <si...@googlemail.com>.
This is another indicator that we should really try to extract Solr's
capabilities like Faceting into modules! Solr should not be required
if you want to use the facteing stuff we already have.

simon

On Wed, Feb 23, 2011 at 10:06 AM, Wouter Heijke <wh...@xs4all.nl> wrote:
> Hi,
> Same here, don't want Solr, so if you want facets BoBo is your friend!
>
> http://sna-projects.com/bobo/
>
> Works great, very easy to use...the only thing is the name, is like dog
> food :-)
> But give BoBo a try!
>
> Wouter
>
>> Hello all,
>>
>> I am using Lucene for my project and we have new requirement  to present
>> data in the form of Analytics. Facet could be used for that but for this
>> purpose i don't want to migrate to Solr. How to acheive this with Lucene.
>> Will facet feature be part of future release of Lucene?
>>
>
>
>
> ---------------------------------------------------------------------
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Facet search

Posted by Simon Willnauer <si...@googlemail.com>.
This is another indicator that we should really try to extract Solr's
capabilities like Faceting into modules! Solr should not be required
if you want to use the facteing stuff we already have.

simon

On Wed, Feb 23, 2011 at 10:06 AM, Wouter Heijke <wh...@xs4all.nl> wrote:
> Hi,
> Same here, don't want Solr, so if you want facets BoBo is your friend!
>
> http://sna-projects.com/bobo/
>
> Works great, very easy to use...the only thing is the name, is like dog
> food :-)
> But give BoBo a try!
>
> Wouter
>
>> Hello all,
>>
>> I am using Lucene for my project and we have new requirement  to present
>> data in the form of Analytics. Facet could be used for that but for this
>> purpose i don't want to migrate to Solr. How to acheive this with Lucene.
>> Will facet feature be part of future release of Lucene?
>>
>
>
>
> ---------------------------------------------------------------------
> 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: Facet search

Posted by Wouter Heijke <wh...@xs4all.nl>.
Hi,
Same here, don't want Solr, so if you want facets BoBo is your friend!

http://sna-projects.com/bobo/

Works great, very easy to use...the only thing is the name, is like dog
food :-)
But give BoBo a try!

Wouter

> Hello all,
>
> I am using Lucene for my project and we have new requirement  to present
> data in the form of Analytics. Facet could be used for that but for this
> purpose i don't want to migrate to Solr. How to acheive this with Lucene.
> Will facet feature be part of future release of Lucene?
>



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