lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: Group the search results by a given field
Date Thu, 17 May 2007 13:38:13 GMT
There has been significant discussion on this topic (way more than
I can remember clearly) on the mail thread, but as I remember it's
been referred to as "facet" or "faceted". I think you would get a lot
of info searching for these terms at...

http://www.gossamer-threads.com/lists/lucene/java-user/

Best
Erick


On 5/17/07, Sawan Sharma <ssharma@chambal.com> wrote:
>
> Hi All,
>
> I was wondering - is it possible to search and group the results by a
> given field?
>
> For example, I have an index with several million records. Most of
> them are different Features of the same ID.
>
> I'd love to be able to do.. groupby=ID or something like that
> in the results, and provide the ID as a clickable link to see
> all the Features of that ID.
>
> I have used HitCollector class to accomplish this goal. In Collect method
> I
> have used following algo...
>
> Collect()
> {
>     if Searcher.Doc(doc_id).get(ID) is not exist in HashKey then
>                    Add Searcher.Doc(doc_id).get(ID) as new HashKey in hash
> table and assign value = 1
>     else
>                    increment HashKey( Searcher.Doc(doc_id).get(ID)) value
> with 1
> }
>
> But, it depends on HitCount. As soon as I get more hits it takes more time
> and my search performance is degrade.
>
> How it can be done with best performance..?
>
> Any ideas?
>
> Sawan
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message