Unable to execute geo_point request using geopolygon filter

Hi I am trying to execute a geo_point request in ElasticSearch using the geopoly filter query syntax . official document], but replay will not be returned. geo pologon filter no result

Here are some details: I am using the river plugin to index data from MySQL to ES with a mapping definition (nested structure and coordinate.value is geo_point).

geo_point mapping definition

I can see the docs from the main plugin:

ElasticSearch document

Json request:

{
  "query": {
    "filtered": {
      "query": {
        "match_all": {}
      },
      "filter": {
        "geo_polygon": {
          "coordinate.value": {
            "points": [
              [
                -180,
                90
              ],
              [
                -180,
                -90
              ],
              [
                180,
                -90
              ],
              [
                -180,
                90
              ]
            ]
          }
        }
      }
    }
  }
}

      

Can anyone tell me what is the correct request method to get the geo_point? Thanks to

+3


source to share


1 answer


the polygon must be closed (i.e. the first and last points must be the same).



+1


source







All Articles