lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Baranczak <MBaranc...@ePublishing.com>
Subject Re: grouping search results
Date Tue, 09 May 2006 19:08:37 GMT

On May 9, 2006, at 2:08 PM, Chris Hostetter wrote:

>
> : redundant work. My next idea was to create a QueryFilter from the
> : user's query, and run a search for each category with this filter  
> and
> : a term query. Since the QueryFilter is supposed to cache results,
> : this should theoretically be more efficient. So my questions to the
>
> if you did an approach like this, the scores for each document in each
> result set would be the same for each set -- becaue the "Query" is  
> just on
> the category term -- the Users's query would only be used to  
> Filter, so
> the score value would be ignored.

Damn. That's no good, then. What about doing it the opposite way:  
make a QueryFilter for each category (these could be cached between  
search sessions), and use those to filter the results from searching  
for the user's query? Would that actually be any faster than the  
original idea of constructing a boolean query for each category?


>
> : 2) Is there yet another way to accomplish what I need?
>
> Off hte top of my head, the best way i can think to do this (if the  
> list
> of categories is fixed and known in advance as you said)

Not exactly fixed, but it probably won't change too often, and it  
will definitely be known at query time. So close enough.

> is with a
> HitCollector that maintains a Bounded PriorityQuery for each  
> category.  as
> it collects matches, it can look up which category they are in  
> using the
> FieldCache and add them to the appropriate queue.

Did you mean PriorityQueue?

Can you explain what you mean by that? I'm looking at the javadocs  
for FieldCache, but there's no indication of how to obtain one.


>
> -Hoss
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message