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

avoid repeated NumericLeafComparator setScorer calls

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 9.2
    • None
    • None
    • New

    Description

      ElasticSearch use CancellableBulkScorer to fast cancel long time query execution by dividing one segment docs to many small split docs. For every split docs, collector.setScorer(scorer) is called, then  NumericLeafComparator#setScorer is called. As a result, for one segment, NumericLeafComparator#setScorer is called many times. 

      Every time NumericLeafComparator#setScorer is called, the NumericLeafComparator#iteratorCost is reset to the Scorer.cost and increase many unnecessary  pointValues#intersect calls to get  competitive docs.

      Attachments

        Activity

          People

            Unassigned Unassigned
            wjp719 jianping weng
            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 - 1h 40m
                1h 40m