apache / apache/lucene

ValueSourceScorer (used in VS range queries) ought to honor FV.exists [LUCENE-6727]

Open
#7,785 0 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major type:enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.