# Unable to index large geo\_shapes in 2.0

**URL:** <https://discuss.elastic.co/t/unable-to-index-large-geo-shapes-in-2-0/38196>\
**Category:** Elasticsearch\
**Created:** [December 30, 2015, 7:29pm UTC](https://discuss.elastic.co/t/unable-to-index-large-geo-shapes-in-2-0/38196 "2015-12-30T19:29:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Hudson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_hudson/32/1306_2.png) [@Brian\_Hudson](https://discuss.elastic.co/u/Brian_Hudson)\
**Post date:** [December 30, 2015, 7:29pm UTC](https://discuss.elastic.co/t/unable-to-index-large-geo-shapes-in-2-0/38196/1 "2015-12-30T19:29:24Z")

</div>

We index some low resolution country polygons (they are still rather large). In ES 1.5.2 we were indexing these without issue with a precision of 1m, even on developer machines. They actually indexed rather quickly.

Having upgraded to 2.0, we aren't able to get these to index (ES 2.0 runs out of heap space, same amount allocated as in 1.5.2) even at 50m precision. With a precision of 100m they begin to index but it is still very slow (~20 minutes for Canada).

Were there significant changes to how geo\_shapes are indexed in 2.0? Or perhaps some default setting that was changed? I reviewed the release notes for 2.0 but did not spot anything that I thought would effect this.

---

<div class="post-metadata">

**Author:** ![nknize](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@nknize](https://discuss.elastic.co/u/nknize)\
**Post date:** [January 6, 2016, 4:09pm UTC](https://discuss.elastic.co/t/unable-to-index-large-geo-shapes-in-2-0/38196/2 "2016-01-06T16:09:51Z")

</div>

Hi Brian\_Hudson,

In 2.0 the `default_error_pct` defaults to `0` if `precision` or `tree_levels` is explicitly defined. (see `distance_error_pct` documentation for [geo\_shape](https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-shape.html) field type) For large shapes this can consume quite a bit of memory. To "revert" to previous behavior explicitly set `distance_error_pct` to 0.025 (or larger if you're comfortable with inaccurate results on the shape boundary, or not querying with shapes at all).

Note also that this is being fixed at the Lucene level so you don't have to worry about heap memory regardless of precision or shape size.

---

<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, 11:26pm UTC](https://discuss.elastic.co/t/unable-to-index-large-geo-shapes-in-2-0/38196/3 "2017-07-05T23:26:42Z")

</div>


