# Can not create a document has mutlipolygon having hole

**URL:** https://discuss.elastic.co/t/can-not-create-a-document-has-mutlipolygon-having-hole/349133
**Category:** Elasticsearch
**Created:** [December 12, 2023, 10:13am UTC](https://discuss.elastic.co/t/can-not-create-a-document-has-mutlipolygon-having-hole/349133 "2023-12-12T10:13:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sai\_Suvam\_Patnaik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sai_suvam_patnaik/32/128175_2.png) [@Sai\_Suvam\_Patnaik](https://discuss.elastic.co/u/Sai_Suvam_Patnaik)
#### Post date: [December 12, 2023, 10:13am UTC](https://discuss.elastic.co/t/can-not-create-a-document-has-mutlipolygon-having-hole/349133/1 "2023-12-12T10:13:06Z")

</div>

Hi all , can anyone help me  
I am facing a following issue .

**Summary**  
Can not create a document has multipolygon having hole.

This is the screenshot of the shp file in qgis:

 ![Screenshot 2023-12-12 at 3.18.04 PM](https://us1.discourse-cdn.com/elastic/original/3X/0/4/04494d3ea32ef696d1f96a5bb5b3a4474116799d.png)

**Expected behavior**  
The document is successfuly created.

**Actual behavior**  
Can not create a document.  
The reponse is status 400.

```auto
{"error":{"root_cause":[{"type":"invalid_shape_exception","reason":"invalid_shape_exception: Invalid shape: Hole is not within polygon"}],"type":"mapper_parsing_exception","reason":"failed to parse [geometry]","caused_by":{"type":"invalid_shape_exception","reason":"invalid_shape_exception: Invalid shape: Hole is not within polygon"}},"status":400}

```

**Environment**  
ES 6.7.8

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [December 12, 2023, 11:47am UTC](https://discuss.elastic.co/t/can-not-create-a-document-has-mutlipolygon-having-hole/349133/2 "2023-12-12T11:47:05Z")

</div>

> [@Sai\_Suvam\_Patnaik](#):
>
> ES 6.7.8

You should definitely upgrade to at least 7.17 and better to 8.11.2.  
Many things have been improved over the years and specifically on the geo side...

---

<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: [January 9, 2024, 11:47am UTC](https://discuss.elastic.co/t/can-not-create-a-document-has-mutlipolygon-having-hole/349133/3 "2024-01-09T11:47:15Z")

</div>

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