Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-8941

Build wildcard matches more lazily

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.3
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      When retrieving a Matches object from a multi-term query, such as an AutomatonQuery or TermInSetQuery, we currently find all matching term iterators up-front, to return a disjunction over all of them. This can be inefficient if we're only interested in finding out if anything matched, and are iterating over a different field to retrieve offsets.

      We can improve this by returning immediately when the first matching term is found, and only collecting other matching terms when we start iterating.

        Attachments

        1. LUCENE-8941.patch
          7 kB
          Alan Woodward
        2. LUCENE-8941.patch
          7 kB
          Alan Woodward

          Activity

            People

            • Assignee:
              romseygeek Alan Woodward
              Reporter:
              romseygeek Alan Woodward
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: