Use different spatial mapping together

(kkmaven) #1


In my application, we have some spatial data like point, multiple point ,poyline, polyogns and etc which require to be searched. Generally most of the spatial data are points, the origin data are saved in the postgresql with the postgis plugin.

Now we need this kind of spatial filter:find features inside (intersects with )a bounding box,polyogn,circle, in most cases, we need to find points inside a box or a circle, intersects operation is rare used(but we need them sometime).

And I am new in elasticsearch,and I just read the documents, there are two mapping under my conserdition:the geo_point and geo_shape, geohash is excluded since we do not think it fit for the complex feature shape.

However as the document said geo_point may provide a better performance if we can use index the lat and lon separated.

Now I wonder if we can use the geo_point to index the points, and the geo_shape to index the polygon and polyline and then search them all together?

(system) #2