Skip to content

Allow SortedNumericDocValues Updates when update is actually single valued #16580

Description

@HoustonPutman

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 #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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions