我的弹性搜索中有以下映射:
{
"mappings": {
"event": {
"_all": { "enabled": false },
"properties": {
"type": { "type": "string", "index": "not_analyzed"},
"id": { "type": "string"},
"location": { "type": "geo_point"}
}
}
}
}
我想要做的是查询由单个 geohash 定义的地图区域内本地化的所有记录。我知道 geohash 单元格查询在我的示例中可以完美运行,但不幸的是,geohash_prefix 选项设置为 true 时需要对 geo_point 字段进行索引,这在 elasticearch 2.4 中已弃用。
在最新的弹性搜索版本中正确的方法是什么?我在文档中的任何地方都找不到它。