[
https://issues.apache.org/jira/browse/LUCENE-6815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adrien Grand updated LUCENE-6815:
---------------------------------
Attachment: LUCENE-6815.patch
Here is a patch I've been hacking on. Nothing changes in the case that no sub
scorer supports two-phase iteration. However, if one or more sub scorers
support approximations, matches() will try to match sub scorers in order of
cost (currently assuming that the cost is 0 if the scorer does not support
two-phase iteration and 1 otherwise) and return as soon as one matches.
DisjunctionScorer will only try to match other sub scorers when score() or
freq() is called.
> Should DisjunctionScorer advance more lazily?
> ---------------------------------------------
>
> Key: LUCENE-6815
> URL: https://issues.apache.org/jira/browse/LUCENE-6815
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Adrien Grand
> Assignee: Adrien Grand
> Priority: Minor
> Attachments: LUCENE-6815.patch
>
>
> Today if you call DisjunctionScorer.advance(X), it will try to advance all
> sub scorers to X. However, if DisjunctionScorer is being intersected with
> another scorer (which is almost always the case as we use BooleanScorer for
> top-level disjunctions), we could stop as soon as we find one matching sub
> scorer, and only advance the remaining sub scorers when freq() or score() is
> called.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]