diff --git a/modules/mapper-extras/src/main/java/org/opensearch/index/mapper/ScaledFloatFieldMapper.java b/modules/mapper-extras/src/main/java/org/opensearch/index/mapper/ScaledFloatFieldMapper.java index 28c21f2bda7ad..c592c1fd21eae 100644 --- a/modules/mapper-extras/src/main/java/org/opensearch/index/mapper/ScaledFloatFieldMapper.java +++ b/modules/mapper-extras/src/main/java/org/opensearch/index/mapper/ScaledFloatFieldMapper.java @@ -236,6 +236,7 @@ public Query termsQuery(List values, @Nullable RewriteOverride rewriteOverrid Query query = NumberFieldMapper.NumberType.LONG.termsQuery( name(), Collections.unmodifiableList(scaledValues), + rewriteOverride, hasDocValues(), isSearchable() ); @@ -271,7 +272,17 @@ public Query rangeQuery( } hi = Math.round(Math.floor(dValue)); } - Query query = NumberFieldMapper.NumberType.LONG.rangeQuery(name(), lo, hi, true, true, hasDocValues(), isSearchable(), context); + Query query = NumberFieldMapper.NumberType.LONG.rangeQuery( + name(), + lo, + hi, + true, + true, + rewriteOverride, + hasDocValues(), + isSearchable(), + context + ); if (boost() != 1f) { query = new BoostQuery(query, boost()); }