Allow SortedNumericDocValues Updates when update is actually single valued
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
### Description
Under the hood, if a `SortedNumericDocValues` field is actually single-valued, then Lucene will store it as a single-valued `NumericDocValues` field and then wrap it to look like a SortedNumericDocValues field when accessed. Therefore, even though the utility classes `DoubleField`, `FloatField`, `LongField` and `IntField` use `SortedNumericDocValues` under the hood, these classes are still great when used with single-valued fields. For doubles and floats in particular, the sorted nature of the docValues representation make range queries better. (See https://github.com/apache/lucene/issues/16573 for one such reason)
One big issue when changing to use this for single-valued fields is that you lose the ability to do docValues updates. There should be no issue supporting updates to single-valued `SortedNumericDocValues`, since ultimately it is a wrapped `NumericDocValues` (which supports updates).
Contributor guide
Research direction
Review the issue description and the linked pull request #16581 first, since work is already underway. The goal is to allow updates for single-valued SortedNumericDocValues fields while retaining their existing behavior; completion should be established by the pull request's implementation and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100