Here is our document :
{ "geometry" : { "type" : "Point", "coordinates" : [ -87.662682, 41.843014 ] } }
We would like to do a geo_shape search using the _geo_distance , as in the same geometry field. The former requires geo_shape types, while the latter requires geo_point .
These two indexes are executed individually, but not together:
"geometry": { "type": "geo_shape" }
and
"geometry": { "properties": { "coordinates": { "type": "geo_point" } } },
So far we have tried these and failed :
"geometry": { "type": "geo_shape" }, "geometry.coordinates": { "type": "geo_point" },
and
"geometry": { "copy_to": "geometryShape", "type": "geo_shape" }, "geometryShape": { "properties": { "coordinates": { "type": "geo_point" } } }
also
"geometry": { "copy_to": "geometryShape", "properties": { "coordinates": { "type": "geo_point" } } }, "geometryShape": { "type": "geo_shape" }
Any ideas on how to properly create this index?
source share