-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add proper longitude validation in geo_polygon_query (#30497)
Fixes longitude validation in geo_polygon_query builder. The queries with wrong longitude currently fail but only later during polygon with quite complicated error message. Fixes #30488
- Loading branch information
Showing
7 changed files
with
69 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 8 additions & 15 deletions
23
server/src/test/resources/org/elasticsearch/index/query/geo_polygon_exception_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 8 additions & 16 deletions
24
server/src/test/resources/org/elasticsearch/index/query/geo_polygon_exception_2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 2 additions & 9 deletions
11
server/src/test/resources/org/elasticsearch/index/query/geo_polygon_exception_3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
{ | ||
"filtered": { | ||
"query": { | ||
"match_all": {} | ||
}, | ||
"filter": { | ||
"geo_polygon": { | ||
"location": ["WRONG"] | ||
} | ||
} | ||
"geo_polygon": { | ||
"location": ["WRONG"] | ||
} | ||
} |
23 changes: 8 additions & 15 deletions
23
server/src/test/resources/org/elasticsearch/index/query/geo_polygon_exception_4.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,12 @@ | ||
{ | ||
"filtered": { | ||
"query": { | ||
"match_all": {} | ||
"geo_polygon": { | ||
"location": { | ||
"points": [ | ||
[-70, 40], | ||
[-80, 30], | ||
[-90, 20] | ||
] | ||
}, | ||
"filter": { | ||
"geo_polygon": { | ||
"location": { | ||
"points": [ | ||
[-70, 40], | ||
[-80, 30], | ||
[-90, 20] | ||
] | ||
}, | ||
"bla": true | ||
} | ||
} | ||
"bla": true | ||
} | ||
} |
23 changes: 8 additions & 15 deletions
23
server/src/test/resources/org/elasticsearch/index/query/geo_polygon_exception_5.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,12 @@ | ||
{ | ||
"filtered": { | ||
"query": { | ||
"match_all": {} | ||
"geo_polygon": { | ||
"location": { | ||
"points": [ | ||
[-70, 40], | ||
[-80, 30], | ||
[-90, 20] | ||
] | ||
}, | ||
"filter": { | ||
"geo_polygon": { | ||
"location": { | ||
"points": [ | ||
[-70, 40], | ||
[-80, 30], | ||
[-90, 20] | ||
] | ||
}, | ||
"bla": ["array"] | ||
} | ||
} | ||
"bla": ["array"] | ||
} | ||
} |