Fix range query for NumericDocValues for float and double values - #16629
Fix range query for NumericDocValues for float and double values#16629HoustonPutman wants to merge 2 commits into
Conversation
…retreival (apache#15760)" This reverts commit 6345fef.
|
We should possibly not backport the deletion of the NumericFieldStats class and keep it in 10.x (deprecated with big warnings). |
|
Maybe we can remove it, as it was introduced in 10.5.0 and it was buggy from beginning. |
|
Catching up here... is the issue that the min and max values as stored in Points don't necessarily translate to the actual min and max double values? I think we need to check that that we aren't making this assumption in other places as well, eg looking at IndexSortSortedNumericDocValuesRangeQuery we use +1 to reverting the change to SortedNumericDocValuesRangeQuery, but I think NumericFieldStats is worth keeping. We need to update it though to take a decoding parameter, and add a bunch more tests. In general I think we don't have enough tests for non-integral numeric values. I can pick that up. |
|
Thanks @hossman for the repro and the float/double test, nice catch. +1 to reverting. Reading back through it, the real issue is that On keeping My understanding is that the important things here are:
That said, since each path already has its own stats source, I would lean toward removing it rather than keeping even separate methods. The whole point of |
|
once we get this merged I will also copy it to 10.5 branch (or feel free to do so, whomever merges) so we can include in 10.5.2 bugfix release |
|
Yeah I thought about keeping As I said in the issue, it would be amazing if we could enforce changing NumericDocValues to require sorted-order long-enocded floats and doubles (like SortedNumericDocValues does), and then we could really start to reason the same between Points and Numeric/SortedNumeric docValues. But that would be a really big (back-compat-breaking) change even for a major version. @romseygeek good point about |
Description
Fixes #16573 by reverting #15740 and #15760.
I've also incorporated @hossman 's test, so thank you for that Hoss.
This is a back-incompat change from 10.5, because it is removing the public
NumericFieldStatsclass (even though it is listed as experimental). This is removed, because there is no way for theNumericFieldStatsclass to know whether or not the Point and DocValues data are encoded similarly. (For SortedNumericDocValues, this can be assumed. So we could just limit to that, but it gets tricky at that point)