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

Add FunctionValues.cost

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 9.0
    • modules/query
    • None
    • New

    Description

      The FunctionRangeQuery uses FunctionValues.getRangeScorer which returns a subclass of ValueSourceScorer. VSC's TwoPhaseIterator has a matchCost impl that returns a constant 100. This is pretty terrible; the cost should vary based on the complexity of the ValueSource provided to FRQ. ValueSource's are typically nested a number of levels, so they should aggregate.

      BTW there is a parallel concern for FunctionMatchQuery which works with DoubleValuesSource which doesn't have a cost either, and unsurprisingly there is a TPI with matchCost 100 there.

      Attachments

        Issue Links

          Activity

            People

              atris Atri Sharma
              dsmiley David Smiley
              Votes:
              0 Vote for this issue
              Watchers:
              5 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 - 4h 10m
                  4h 10m