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

Add FunctionValues.cost

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: main (9.0)
    • Component/s: modules/query
    • Labels:
      None
    • Lucene Fields:
      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

              • Assignee:
                atris Atri Sharma
                Reporter:
                dsmiley David Smiley
              • Votes:
                0 Vote for this issue
                Watchers:
                4 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