ValueSourceScorer (used in VS range queries) ought to honor FV.exists [LUCENE-6727]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
(discussion split off from LUCENE-6720)
ValueSourceScorer is an abstract scorer based on a ValueSource; notably it's returned by FunctionValues.getRangeScorer. None of the implementations consider FunctionValues.exist(doc). It really ought to. DocValuesRangeQuery does.
Perhaps this should be based on the ValueFillter/MutableValue API. It optimizes existence & value fetching in one fetch when possible. Furthermore, it might be possible to have a common range query check without doing it per-type?
---
Migrated from [LUCENE-6727](https://issues.apache.org/jira/browse/LUCENE-6727) by David Smiley (@dsmiley)
Contributor guide
Research direction
Start by tracing ValueSourceScorer and its FunctionValues.getRangeScorer implementations, then compare their existence handling with DocValuesRangeQuery. Review FunctionValues.exists(doc), ValueFilter, and MutableValue to determine how range scoring should exclude non-existent values; done means all relevant range scorers honor existence consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100