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

Build wildcard matches more lazily

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 8.3
    • None
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: