Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
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.