# Geoshape Indexing Painfully Slow with Polygon

**URL:** <https://discuss.elastic.co/t/geoshape-indexing-painfully-slow-with-polygon/48733>\
**Category:** Elasticsearch\
**Created:** [April 28, 2016, 8:39pm UTC](https://discuss.elastic.co/t/geoshape-indexing-painfully-slow-with-polygon/48733 "2016-04-28T20:39:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![saipa](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@saipa](https://discuss.elastic.co/u/saipa)\
**Post date:** [April 28, 2016, 8:39pm UTC](https://discuss.elastic.co/t/geoshape-indexing-painfully-slow-with-polygon/48733/1 "2016-04-28T20:39:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [April 29, 2016, 5:06am UTC](https://discuss.elastic.co/t/geoshape-indexing-painfully-slow-with-polygon/48733/2 "2016-04-29T05:06:28Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:55pm UTC](https://discuss.elastic.co/t/geoshape-indexing-painfully-slow-with-polygon/48733/3 "2017-07-05T22:55:21Z")

</div>


