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

Avoid parsing all terms in TermInSetQuery.visit()

    XMLWordPrintableJSON

    Details

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

      Description

      TermInSetQuery currently iterates through all its prefix-encoded terms in order to build an array to pass back to its visitor when visit() is called.  This seems like a waste, particularly when the visitor is not actually consuming the terms (for example, when doing a clause-count check before executing a search).  Instead TermInSetQuery should use consumeTermsMatching(), and we should change the signature of this method so that it takes a BytesRunAutomaton supplier to allow for lazy instantiation.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h