# Can not bulk update with script on index have mapping strict dynamic?

**URL:** <https://discuss.elastic.co/t/can-not-bulk-update-with-script-on-index-have-mapping-strict-dynamic/313132>\
**Category:** Elasticsearch\
**Created:** [August 29, 2022, 8:24am UTC](https://discuss.elastic.co/t/can-not-bulk-update-with-script-on-index-have-mapping-strict-dynamic/313132 "2022-08-29T08:24:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![robocon20x](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robocon20x/32/99145_2.png) [@robocon20x](https://discuss.elastic.co/u/robocon20x)\
**Post date:** [August 29, 2022, 8:24am UTC](https://discuss.elastic.co/t/can-not-bulk-update-with-script-on-index-have-mapping-strict-dynamic/313132/1 "2022-08-29T08:24:09Z")

</div>

Hi guys, i use bulk request with Http to ES, but the error strict\_dynamic\_mapping\_exception has appear.  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/8/786fcb00718b607afc15d2eac246ed71751183c2.png)  
this error not happening when I use bulk request with index have no dynamic\_strict.  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/1/71673d2ce7b8bfc470ed2e0cdcb93f7aa4227c4f.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/5/85b6d2192c5827aa39e0b09e80e919ca6e331f93.png)  
in my case, bulk request run with test\_v3\_customer and not with v3\_customer.  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/7/970417d2aec25bed482b6fd1ba436c261b87e50a.png)  
here is my bulk body for example.

How can I fix this. My ES version is 7.12.0. Thanks

---

<div class="post-metadata">

**Author:** ![robocon20x](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robocon20x/32/99145_2.png) [@robocon20x](https://discuss.elastic.co/u/robocon20x)\
**Post date:** [August 29, 2022, 9:46am UTC](https://discuss.elastic.co/t/can-not-bulk-update-with-script-on-index-have-mapping-strict-dynamic/313132/2 "2022-08-29T09:46:20Z")

</div>

can anyone help me ☹

---

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [August 29, 2022, 4:47pm UTC](https://discuss.elastic.co/t/can-not-bulk-update-with-script-on-index-have-mapping-strict-dynamic/313132/3 "2022-08-29T16:47:54Z")

</div>

Hi @robocon20x

About the ["strict"](https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic.html#dynamic-parameters):

> If new fields are detected, an exception is thrown and the document is rejected. New fields must be explicitly added to the mapping.

Your bulk is probably adding a field that is not mapped.

The way to fix it is for you to create the index without **dynamic:strict** or map the new field in the index.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 30, 2022, 12:54am UTC](https://discuss.elastic.co/t/can-not-bulk-update-with-script-on-index-have-mapping-strict-dynamic/313132/4 "2022-08-30T00:54:04Z")

</div>

Please don't post pictures of text, logs or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them 🙂

---

<div class="post-metadata">

**Author:** ![robocon20x](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robocon20x/32/99145_2.png) [@robocon20x](https://discuss.elastic.co/u/robocon20x)\
**Post date:** [September 5, 2022, 11:32am UTC](https://discuss.elastic.co/t/can-not-bulk-update-with-script-on-index-have-mapping-strict-dynamic/313132/5 "2022-09-05T11:32:04Z")

</div>

thanks, i found the problem and forgot to close the topic ☹ , I forgot to delete : in filed name.

---

<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:** [October 3, 2022, 11:32am UTC](https://discuss.elastic.co/t/can-not-bulk-update-with-script-on-index-have-mapping-strict-dynamic/313132/6 "2022-10-03T11:32:48Z")

</div>

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