lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Sorting and TopDocCollector
Date Mon, 26 Nov 2007 18:33:18 GMT

:   I am using TopDocCollector in for get the
: BitSet of result, but I need of sort the result by two variable:  by
: any term of document and by score. Is possible do it using Collector ?
:   Have any form of use the method search(..., sort) and after get the
: BitSet of result ?

the HitCollector APIs are lower level and somewhat orthoginal to the Sort 
based APIs ... the APIs thattake a HitCollector ar designed to give *your* 
HitCollector all of the matches with as little overhead as possible -- you 
are free to do anything you want in the HitCollector, including keep track 
of the "best" results based on a particular sort.

Perhaps instead of subclassing TopDocCollector, you should look at 


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

View raw message