円と交差するレコードのリストを取得しようとしています。
マッピング: geo_point と geo_shape がありますが、geo_shape のみを参照しています
{
"mappings": {
"poi": {
"properties": {
"id": {
"type": "string",
"index": "not_analyzed"
},
"type": {
"type": "string",
"index": "not_analyzed"
},
"name": {
"type": "string",
"analyzer": "whitespace"
},
"pin": {
"type": "geo_point"
},
"geometry": {
"type": "geo_shape",
"tree": "quadtree",
"precision": "1m"
},
"extras": {
"type": "object"
}
}
}
}
}
レコード (リストの最初、必ずしも一致するとは限りません)
{
"id": 416824728,
"pin": [
11.2418666,
46.4718564
],
"geometry": {
"type": "Point",
"coordinates": [
11.2418666,
46.4718564
]
},
"extras": {
"capacity": "5",
"amenity": "parking",
"fee": "no"
},
"name": "",
"type": "poi"
}
クエリ:
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geo_shape": {
"geometry": {
"shape": {
"type": "circle",
"radius": "100km",
"coordinates": [
11,
46
]
}
}
}
}
}
}
}
なにか提案を?
ありがとう