From 53f316b540264f79b38bad6d0aaab46942399987 Mon Sep 17 00:00:00 2001 From: javanna Date: Wed, 7 Oct 2015 12:53:19 +0200 Subject: [PATCH] GeoDistanceRangeQueryBuilder to not change its state when calling toQuery The geoPoint gets normalized while calling toQuery. That should happen on a copy of the point though, the state of the request should never change as part of toQuery execution. Also updated corresponding test to support point normalization. Closes #13984 --- .../index/query/GeoDistanceRangeQueryBuilder.java | 1 + .../index/query/GeoDistanceRangeQueryTests.java | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/index/query/GeoDistanceRangeQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/GeoDistanceRangeQueryBuilder.java index f545a33f826..a265427b312 100644 --- a/core/src/main/java/org/elasticsearch/index/query/GeoDistanceRangeQueryBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/query/GeoDistanceRangeQueryBuilder.java @@ -221,6 +221,7 @@ public class GeoDistanceRangeQueryBuilder extends AbstractQueryBuilder