Skip to content

Conversation

@romseygeek
Copy link
Contributor

SortedNumericDocValuesRangeQuery and IndexSortSortedNumericDocValuesRangeQuery
both implement queries over ranges of numeric doc values, but they cannot be easily
introspected. This commit adds a common base class which exposes the field, lowerValue
and upperValue of the query.

This can be useful for things like queryparsers which can automatically rewrite multiple
overlapping queries into single instances.

SortedNumericDocValuesRangeQuery and IndexSortSortedNumericDocValuesRangeQuery
both implement queries over ranges of numeric doc values, but they cannot be
easily introspected. This commit adds a common base class which exposes the
field, lowerValue and upperValue of the query.
@romseygeek romseygeek added this to the 10.4.0 milestone Dec 5, 2025
Copy link
Contributor

@HoustonPutman HoustonPutman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The equals method could probably be moved up, but not a big deal keeping it in each sub-class.

@romseygeek
Copy link
Contributor Author

The equals method could probably be moved up, but not a big deal keeping it in each sub-class.

Query classes generally do type equality as well so best to keep it separate I think.

@romseygeek romseygeek merged commit 2a17a54 into apache:main Dec 8, 2025
12 checks passed
@romseygeek romseygeek deleted the numeric-range-query branch December 8, 2025 14:43
romseygeek added a commit that referenced this pull request Dec 8, 2025
SortedNumericDocValuesRangeQuery and IndexSortSortedNumericDocValuesRangeQuery
both implement queries over ranges of numeric doc values, but they cannot be
easily introspected. This commit adds a common base class which exposes the
field, lowerValue and upperValue of the query.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants