lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: RE : ReSorting
Date Tue, 25 May 2004 14:44:36 GMT
On May 25, 2004, at 9:45 AM, Rasik Pandey wrote:
> Erik,
>
>> 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"?

Actually, after thinking about it a bit more, it would be impossible to 
re-sort Hits after a search.  The new sorting infrastructure is 
extremely efficient with resources, and does not keep more than it 
needs to around.  So you could not change the field it is sorted on 
without re-searching.

If all you were going to do is reverse a sort, you could walk the Hits 
backwards instead of re-sorting or re-searching.

I still say your best bet (and surely not slow?) is to re-search.

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

Again, this is not correct if you keep the IndexReader or IndexSearcher 
around.

	Erik



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message