Fix small error in distance normalization in test
This commit is contained in:
parent
c2259a2edd
commit
bd1d935c26
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue