Fix small error in distance normalization in test

This commit is contained in:
Christoph Büscher 2015-12-10 20:33:01 +01:00
parent c2259a2edd
commit bd1d935c26
1 changed files with 1 additions and 0 deletions

View File

@ -204,6 +204,7 @@ public class GeoDistanceQueryBuilderTests extends AbstractQueryTestCase<GeoDista
double distance = queryBuilder.distance(); double distance = queryBuilder.distance();
if (queryBuilder.geoDistance() != null) { if (queryBuilder.geoDistance() != null) {
distance = queryBuilder.geoDistance().normalize(distance, DistanceUnit.DEFAULT); distance = queryBuilder.geoDistance().normalize(distance, DistanceUnit.DEFAULT);
distance = org.elasticsearch.common.geo.GeoUtils.maxRadialDistance(queryBuilder.point(), distance);
assertThat(geoQuery.getRadiusMeters(), closeTo(distance, GeoUtils.TOLERANCE)); assertThat(geoQuery.getRadiusMeters(), closeTo(distance, GeoUtils.TOLERANCE));
} }
} }