Very slow indexing with geo-shape


I'm seeing very slow indexing with ElasticSearch when I set up a geo-shape type.
I'm using a stock 5.0.0 on Windows 7, no customisations, and I'm accessing it via the Python wrapper.

I have 75 documents to index and if I don't set up a mapping, they index near instantly.

But the second I include a geo-shape mapping, the processing time plunges, CPU usage rockets and inevitably it times out on the index creation (timeout is the default 10s).

My mapping for the geo-shape looks like this:
"bbox": {
"type": "geo_shape",
"precision": "100m"

Each document has two geo-shapes. The shapes are simple envelope types as they're only bounding boxes - spatially this should be the simplest indexing there is.

The problem seems to be the precision. I've already increased it from the default (which is 50m), but to not get a massive performance hit I need to set it to something like 10km (still takes 2-3 times longer than without the geo-shape), which is absurdly imprecise.

Changing the tree type to quadtree is several times faster with precision at 1km, but still times out at 100m.

I've seen the section on "performance considerations" in the docs ( ) - but this is far slower than I expected. In a conventional spatial RDBMS I'm used to being able to insert hundreds if not thousands of complex spatial features every second into a PostGIS/Oracle database with the indexing happening behind the scenes.

Is there anything I can do to speed this up beyond lose any semblance of precision?

(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.