I'm trying to get a list of record intersecting a circle.
the mappings: I have a geo_point and a geo_shape but I'm referring at geo_shape exclusively
{
"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"
}
}
}
}
}
a record (first of list, not necessarily matching)
{
"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"
}
the query:
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geo_shape": {
"geometry": {
"shape": {
"type": "circle",
"radius": "100km",
"coordinates": [
11,
46
]
}
}
}
}
}
}
}
Any suggestion?
Thanks