You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Volodymyr Bychkoviak <vb...@i-hypergrid.com> on 2005/10/21 10:39:11 UTC

Non scored results

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?

thanks.

-- 
regards,
Volodymyr Bychkoviak


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


Re: Non scored results

Posted by Chris Hostetter <ho...@fucit.org>.
: 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.

And depending on the types of "queries" you want to do, using Filter
varients and calling the bits() method directly might be even faster.

(There is not TermFilter ... but it would be trivial to write, other
Query->Filter translations would be equally simple)




-Hoss


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


Re: Non scored results

Posted by Paul Elschot <pa...@xs4all.nl>.
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 <vb...@i-hypergrid.com> 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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Non scored results

Posted by Yonik Seeley <ys...@gmail.com>.
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 <vb...@i-hypergrid.com> 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?
>
> thanks.
>
> --
> regards,
> Volodymyr Bychkoviak
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


--
-Yonik
Now hiring -- http://tinyurl.com/7m67g