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 Elias Khsheibun <el...@gmail.com> on 2009/12/25 22:46:28 UTC

BooleanScorer

When I write the following query:

"Computer AND Science" - the code that is in BooleanScorer2 is invoked, and
when I write "Computer OR Science" the code in BooleanScorer is invoked. How
can I make the OR (the conjunctive query) to use the BooleanScorer2 and not
BooleanScorer, which is the new implementation.


Elias.


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


Re: BooleanScorer

Posted by Michael McCandless <lu...@mikemccandless.com>.
BooleanQuery uses BooleanScorer when possible because that gives
better performance than BooleanScorer2.

If you really want to force it, you'd need to create the weight/scorer
yourself, passing "true" for scoreDocsInOrder.  Alternatively, you
could make your collector, for example wrapping another collector,
that returns "false" for acceptsDocsOutOfOrder.

But: why do you need/want to do this?

Mike

On Fri, Dec 25, 2009 at 4:46 PM, Elias Khsheibun <el...@gmail.com> wrote:
> When I write the following query:
>
> "Computer AND Science" - the code that is in BooleanScorer2 is invoked, and
> when I write "Computer OR Science" the code in BooleanScorer is invoked. How
> can I make the OR (the conjunctive query) to use the BooleanScorer2 and not
> BooleanScorer, which is the new implementation.
>
>
> Elias.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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