Hello,
I have a geoshape field called geojson. And then per item in the index, I put a LIST of shapes in the geojson field. Not one multipolygon but a LIST of polygons/multipolygons.
When I query for getting all objects intersecting a coordinate, I get the list of objects. However if lets say 2 shapes in the geojson field of one object intersect with the coordinate, the object shows twice in the hits. Is there any way to tell Elasticsearch to return unique results? I would rather not use aggregations for this issue.
:
POST indx/model/_search
{
"_source": ["resto_id"],
"query": {
"bool": {
"filter": {
"geo_shape": {
"geojson": {
"relation": "intersects",
"shape": {
"coordinates": [
-118.405925772, 33.872550479
],
"type": "point"
}
}
}
}
}
}
}