Hi I'm trying to query geo_point in ElasticSearch, using the query syntax geo polygon filter in the official document], but no reusult is returned.
Here are some details: I use river plugin to index the data from MySQL into ES with the definition of mapping (a nested structure but coordinate.value is geo_point).
I can see the documents from head plugin:
The query json is:
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geo_polygon": {
"coordinate.value": {
"points": [
[
-180,
90
],
[
-180,
-90
],
[
180,
-90
],
[
-180,
90
]
]
}
}
}
}
}
}
Can anyone tell me what's the correct query method to get geo_point? Thanks
polygon should be closed (ie first and last points should be the same).