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
Mh, now I found out that latests sdks provide a priority queue too, although
unbounded. But, supposing the queue has already top-n elements, I could
compare the current heap with the head (O(1)), if it is smaller or equal
just discard it, and another way remove the head ((O(log(top-n))) and insert