[
https://issues.apache.org/jira/browse/LUCENE-4396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13937683#comment-13937683
]
Michael McCandless commented on LUCENE-4396:
--------------------------------------------
Da, that's a great discovery.
So, in the case where at least one MUST clause is present, BS will in fact
collect in-order, and then BS could be embedded in other queries that want a
sub-scorer.
This may force us to more strongly separate the notion of "force doc-at-a-time
scoring" (LUCENE-2684), since today the "sneaky" way to do this is return false
from your Collector.acceptsDocsOutOfOrder.
I think you should be careful in your proposal to keep this issue well-scoped.
I.e., the overall goal is to let BS handle MUST clauses in certain causes
(heuristic needs to decide this), and then a nice-to-have is to enable BS too
also be a sub-scorer in some cases.
> BooleanScorer should sometimes be used for MUST clauses
> -------------------------------------------------------
>
> Key: LUCENE-4396
> URL: https://issues.apache.org/jira/browse/LUCENE-4396
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Michael McCandless
>
> Today we only use BooleanScorer if the query consists of SHOULD and MUST_NOT.
> If there is one or more MUST clauses we always use BooleanScorer2.
> But I suspect that unless the MUST clauses have very low hit count compared
> to the other clauses, that BooleanScorer would perform better than
> BooleanScorer2. BooleanScorer still has some vestiges from when it used to
> handle MUST so it shouldn't be hard to bring back this capability ... I think
> the challenging part might be the heuristics on when to use which (likely we
> would have to use firstDocID as proxy for total hit count).
> Likely we should also have BooleanScorer sometimes use .advance() on the subs
> in this case, eg if suddenly the MUST clause skips 1000000 docs then you want
> to .advance() all the SHOULD clauses.
> I won't have near term time to work on this so feel free to take it if you
> are inspired!
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]