lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tsuraan <>
Subject Re: Sort and Collector
Date Wed, 03 Feb 2010 21:02:58 GMT
> It's not really possible.
> Lucene must iterate over all of the hits before it knows for sure that
> it has the top sorted by any criteria (other than docid).
> A Collector is called for every hit as it happens, and thus one can't
> specify a sort order (sorting itself is actually implemented with a
> sorting Collector).

Ok, so the sort doesn't actually affect the order in which a searcher
iterates over an index, it just gets used by a TopDocsCollector to
sort hits as they come in.  I guess that makes sense.  Thanks!

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

View raw message