Geoshape Indexing Painfully Slow with Polygon

I have multiple documents that have a field "geometry" that contains Polygon or LineString. I notice that it is VERY slow to index. So slow that I get a gateway timeout on my network and all my documents fail to make it in.

The mapping of my field is:

"precision": "1.0m",
"tree": "quadtree",
"type": "geo_shape"

Just like in the docs. How can I improve the performance of the indexing? Without the geoindexing, my thousands of documents go in lightning fast.

Hey @saipa, if you could provide some more details, it would help

  1. What's the cluster configuration?
  2. What do the logs show when you're getting timeouts?
  3. How many documents are you sending at a time?
  4. Can you show the mappings for the types containing the geometry?
  5. How many points are typically in a Polygon or LineString?
  6. What's the payload size per document? And total payload per bulk request?
  7. Do the Polygons have any interior rings?