1
0
Эх сурвалжийг харах

Aggregations: Fixed failures when geo points are all either positive or negative

Colin Goodheart-Smithe 11 жил өмнө
parent
commit
f78480a0bc

+ 2 - 2
src/main/java/org/elasticsearch/search/aggregations/metrics/geobounds/InternalGeoBounds.java

@@ -172,9 +172,9 @@ public class InternalGeoBounds extends InternalMetricsAggregation implements Geo
         if (Double.isInfinite(top)) {
             return null;
         } else if (Double.isInfinite(posLeft)) {
-            return new BoundingBox(new GeoPoint(top, negLeft), new GeoPoint(bottom, posRight));
+            return new BoundingBox(new GeoPoint(top, negLeft), new GeoPoint(bottom, negRight));
         } else if (Double.isInfinite(negLeft)) {
-            return new BoundingBox(new GeoPoint(top, posLeft), new GeoPoint(bottom, negRight));
+            return new BoundingBox(new GeoPoint(top, posLeft), new GeoPoint(bottom, posRight));
         } else if (wrapLongitude) {
             double unwrappedWidth = posRight - negLeft;
             double wrappedWidth = (180 - posLeft) - (-180 - negRight);