Adrien Grand created LUCENE-7765:
------------------------------------
Summary: Remove Scorer.iterator
Key: LUCENE-7765
URL: https://issues.apache.org/jira/browse/LUCENE-7765
Project: Lucene - Core
Issue Type: Wish
Reporter: Adrien Grand
Priority: Minor
There are two ways that you can consume the documents that a {{Scorer}}
matches: {{Scorer.iterator()}} and {{Scorer.twoPhaseIterator()}}, which is
optional (it returns null if two-phase iteration is not supported). I think it
made sense to make two-phase iteration optional in the beginning but it also
has the drawback that it is too easy to forget to delegate two-phase iteration
in compound queries (see eg. LUCENE-7654) so I am considering removing
{{Scorer.iterator}} so that all scorers would be consumed using two-phase
iteration.
It would probably be undesirable to use two-phase iteration on simple
(combinations of) term queries, but I guess that could be easily addressed by
using a special implementation of {{TwoPhaseIterator}} for the case that the
approximation is accurate and eliminating it eg. in {{ConjunctionDISI}}.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]