1

弹性搜索 7.5.1

我试图找到所有相交或位于给定圆内的索引多边形/多多边形,而不是在给定多边形内。我的形状被索引为

"geometry": {
  "type": "geo_shape",
  "tree_levels": 16,
  "strategy": "recursive"
}

当前的(多边形)查询看起来像

   "query": {
        "geo_shape": {
            "geometry": {
                "shape": {
                    "coordinates": [
                        [
                            [
                                130.12509,
                                1.20136
                            ],
                            [
                                130.69336,
                                -9.18887
                            ],
                            [
                                154.02832,
                                -12.72608
                            ],
                            [
                                163.52051,
                                -10.01213
                            ],
                            [
                                141.78762,
                                5.33949
                            ],
                            [
                                130.12509,
                                1.20136
                            ]
                        ]
                    ],
                    "type": "polygon",
                    "relation": "intersects"
                }
            }
        }
    }

"type": "circle"如果可能的话,我宁愿提供一个查询,比如

"query": {
    "geo_shape": {
        "geometry": {
            "shape": {
                "type": "circle",
                "radius" "5km",
                "coordinates":
                [
                    130.12509,
                    1.20136
                ],
                "relation": "within"
            }
        }
    }
}

我知道,因为不再支持 V6 圆中的重大更改,但这是否可能以某种方式或 ES 是否为给定的圆提供多边形近似?提前致谢

4

0 回答 0