Re: Two differently sorted result sets from the same search

2007-06-01 Thread Doron Cohen
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

Re: Two differently sorted result sets from the same search

2007-06-01 Thread Carlos Pita
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

Two differently sorted result sets from the same search

2007-06-01 Thread Carlos Pita
Hi all, I need to find a couple of result sets at the same time from the same search-criteria. The two sets are sorted according different sort-criteria. From both I need just the few top N results, but anyway, because of business rules, I need to process the entire hit set for the search. Till