Details

    • Type: Wish
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jpountz Adrien Grand
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: