[
https://issues.apache.org/jira/browse/LUCENE-4396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13941775#comment-13941775
]
Da Huang commented on LUCENE-4396:
----------------------------------
Sorry for my late reply. I have been thinking about the new code/design on the
trunk these days.
The new code breaks out BulkScorer from Scorer, and it is necessary to create a
new BooleanScorer (a Scorer), just as you said. I'm afraid that we do have to
take Scorer instead as subScorer in the new BooleanScorer. And yes:
BooleanBulkScorer should not be embeded as its docIDs are out of order. My idea
is to keep BooleanBulkScorer just supporting no-MUST-clause case, and let the
new BooleanScorer to deal with the case where there is at least one MUST
clause. I think this is one of the best ways to be compatible with the current
design.
Besides, I'm afraid that the name of BulkScorer may be confusing. The new
BooleanScorer is also implemented by scoring a range of documents at once, but
it actually can act as Sub-Scorer.
> 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]