Closed
Description
The Rectangle
constructor validates bounds before coerce
has a chance to to normalize coordinates. Here is a test case that reproduces the bug:
public void testHonorsCoercion() throws IOException {
assumeTrue("test runs only when at least a type is registered", getCurrentTypes().length > 0);
String query = "{\n" +
" \"geo_bounding_box\": {\n" +
" \"validation_method\": \"COERCE\",\n" +
" \"location\": {\n" +
" \"top_left\": {\n" +
" \"lat\": -15.5,\n" +
" \"lon\": 176.5\n" +
" },\n" +
" \"bottom_right\": {\n" +
" \"lat\": -19.6,\n" +
" \"lon\": 181\n" +
" }\n" +
" }\n" +
" }\n" +
"}\n";
assertGeoBoundingBoxQuery(query);
}