lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <DOR...@il.ibm.com>
Subject Re: Two differently sorted result sets from the same search
Date Fri, 01 Jun 2007 21:58:26 GMT
Carlos Pita wrote on 01/06/2007 13:59:25:

> 2) Instead of a TopFieldDocCollector use some
> kind of bounded priority queue optimized for
> top-N results. With a HitCollector, a Filter
> and two of these queues it's easy and efficient
> to find both result sets on one  simple pass.
> Do you know of a good implementation of this data structure?

> Is there something similar that I can borrow from lucene sources?

You can collect into (your) subclass(es) of
o.a.lucene.util.PriorityQueue:
  Provide a lessThan().
  Call initialize(maxSize) with the limit.

Doron


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