lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Ingersoll" <>
Subject Re: RE : ReSorting
Date Tue, 25 May 2004 13:59:04 GMT
I solve this problem by using the HitCollector interface instead of the Hits interface and
putting the hit information into my own SearchResult object which is then stuffed into a SortedSet.
 I can then easily resort as needed using the standard collection capabilities in Java.

Using HitCollector is pretty straightforward to implement.


>>> 05/25/04 09:45AM >>>

> No, re-sorting without re-running a search is not possible (at
> least
> not easily).

It would be nice to be able to provide different views of Hits based on different sort criteria
without touching the index for a second time as the "desired" results have already been returned.
What do you mean by "not easily"?

>Why not just re-run a search with a different
> sort?

Of course that is one solution, but maybe not the most solid. As theoretically, an index at
time A is not necessarily the same index at time B. If the use case requires the most update
data from the index then your solution would suffice, but if a quasi snap-shot of a set of
results needed to be kept, it wouldn't solve the problem.


To unsubscribe, e-mail: 
For additional commands, e-mail: 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message