On Friday 21 October 2005 15:16, Yonik Seeley wrote:
> It can...
> 
> By the time the hitcollector is called, the documents are already scored, so
> you don't save any time there. But since they haven't been sorted yet, you
> do save the time it would take to put all the hits through the priority
> queue to find the top "n".
> 
> -Yonik
> 
> On 10/21/05, Volodymyr Bychkoviak <[EMAIL PROTECTED]> wrote:
> >
> > Hello all.
> >
> > If I need non scored results can I use
> > Searcher.search(Query,HitCollector) method and store bitset of found
> > documents.
> > will it give me some speed improvement?

With the default scoring methods, there is hardly any gain in doing this.
Nevertheless, to try this out, you need a Scorer for the query via 
Query.weight(Searcher).scorer(IndexReader) and then use Scorer.next() and 
Scorer.doc() only, ie. do not use Scorer.score().
The searcher can be opened on the index reader to have both available.

In case you have an OR like boolean query, with optional clauses only,
it may be faster iterate over the documents of each clause seperately
to set the document bits.

Regards,
Paul Elschot


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to