Skip to content

Commit

Permalink
Fix scaled float
Browse files Browse the repository at this point in the history
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
  • Loading branch information
harshavamsi committed Aug 8, 2024
1 parent 815de3d commit 6566923
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
Expand Down Expand Up @@ -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());
}
Expand Down

0 comments on commit 6566923

Please sign in to comment.