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

Weight#matches should use the scorerSupplier to create scorers

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.1, master (9.0)
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The default implementation for Weight#matches creates a scorer to check if the document matches. Since this API is per document it would be more efficient to create a ScorerSupplier and then create the scorer with a leadCost of 1.

        Attachments

        1. LUCENE-8751.patch
          4 kB
          Jim Ferenczi

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jim.ferenczi Jim Ferenczi
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: