elasticsearch Elasticsearch-返回给定点中的多边形(关系“:”相交将返回并集),elasticsearch,kibana,elasticsearch,Kibana" /> elasticsearch Elasticsearch-返回给定点中的多边形(关系“:”相交将返回并集),elasticsearch,kibana,elasticsearch,Kibana" />

elasticsearch Elasticsearch-返回给定点中的多边形(关系“:”相交将返回并集)

elasticsearch Elasticsearch-返回给定点中的多边形(关系“:”相交将返回并集),elasticsearch,kibana,elasticsearch,Kibana,索引中有多个多边形,我试图返回给定点中的所有多边形 但是我的查询返回索引中的所有文档,即使它不在多边形1中 它给了我联合而不是交叉 查询如下 地图参考 样本数据: { "type": "Feature", "geometry": { "name": "Poly - 04", "type": "Polygon", "coordinates": [ [ [ 14

索引中有多个多边形,我试图返回给定点中的所有多边形

但是我的查询返回索引中的所有文档,即使它不在多边形1中

它给了我联合而不是交叉

查询如下

地图参考

样本数据:

{
      "type": "Feature",
      "geometry": {
        "name": "Poly - 04",
        "type": "Polygon",
        "coordinates": [
        [
            [
              144.91670608520508,
              -37.82524314302977
            ],
            [
              144.96846199035645,
              -37.82524314302977
            ],
            [
              144.96846199035645,
              -37.78787789236923
            ],
            [
              144.91670608520508,
              -37.78787789236923
            ],
            [
              144.91670608520508,
              -37.82524314302977
            ]
          ]

        ]
      }
    }
查询:

    GET /example3/_search
    {
        "query":{
            "bool": {
                "must": {
                    "match_all": {}
                },
                "filter": {
                    "geo_shape": {
                        "features.geometry": {
                          "relation": "intersects",
                            "shape": {
                                "type": "point",
                                "coordinates" : 
                                   [
                                      146.0138,
                                      -37.1734

                                    ]

                            }
                        }
                    }
                }
            }
        }
    }

请更新您的code@RatanUdayKumar我已经更新了索引和数据集
    GET /example3/_search
    {
        "query":{
            "bool": {
                "must": {
                    "match_all": {}
                },
                "filter": {
                    "geo_shape": {
                        "features.geometry": {
                          "relation": "intersects",
                            "shape": {
                                "type": "point",
                                "coordinates" : 
                                   [
                                      146.0138,
                                      -37.1734

                                    ]

                            }
                        }
                    }
                }
            }
        }
    }