# Updating mapping dynamic false -\> dynamic strict unexpected behaviour

**URL:** <https://discuss.elastic.co/t/updating-mapping-dynamic-false-dynamic-strict-unexpected-behaviour/12935>\
**Category:** Elasticsearch\
**Created:** [July 25, 2013, 11:50am UTC](https://discuss.elastic.co/t/updating-mapping-dynamic-false-dynamic-strict-unexpected-behaviour/12935 "2013-07-25T11:50:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paolo\_Negri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paolo_negri/32/1960_2.png) [@Paolo\_Negri](https://discuss.elastic.co/u/Paolo_Negri)\
**Post date:** [July 25, 2013, 11:50am UTC](https://discuss.elastic.co/t/updating-mapping-dynamic-false-dynamic-strict-unexpected-behaviour/12935/1 "2013-07-25T11:50:32Z")

</div>

Hi List,

I'm trying to update a mapping for one of my types using the put mapping  
API [1]

Precisely I'd like to set for some objects the "dynamic" property changing  
it from false to strict

I'm executing the following

curl -X PUT '[http://localhost:9200/my\_index](http://localhost:9200/my_index)'

curl -X PUT -d  
'{"my\_type":{"dynamic":"false","properties":{"fields":{"type":"string"}}}}'  
'[http://localhost:9200/my\_index/my\_type/\_mapping](http://localhost:9200/my_index/my_type/_mapping)'

curl -X PUT -d  
'{"my\_type":{"dynamic":"strict","properties":{"fields":{"type":"string"}}}}'  
'[http://localhost:9200/my\_index/my\_type/\_mapping](http://localhost:9200/my_index/my_type/_mapping)'

but at the end when I check the resulting mapping

curl '[http://localhost:9200/my\_index/my\_type/\_mapping](http://localhost:9200/my_index/my_type/_mapping)'

{"my\_type":{"dynamic":"false","properties":{"fields":{"type":"string"}}}

I would expect to see the dynamic attribute changed to strict, what am I  
doing wrong?

[1] [http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping/](http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping/)

Thanks in advance for your help

Paolo

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [July 26, 2013, 6:03am UTC](https://discuss.elastic.co/t/updating-mapping-dynamic-false-dynamic-strict-unexpected-behaviour/12935/2 "2013-07-26T06:03:33Z")

</div>

Hey,

is it possible, that you are hitting this issue

> <https://github.com/elastic/elasticsearch/issues/3384>
>
> Allow to update / merge in the dynamic flag on object or the root object mapper,… meaning that it can be changed dynamically using the update mapping API.

Setting the dynamic setting during runtime will be possible in the next  
version.

--Alex

On Thu, Jul 25, 2013 at 1:50 PM, Paolo Negri [hungryblank@gmail.com](mailto:hungryblank@gmail.com) wrote:

> Hi List,
> 
> I'm trying to update a mapping for one of my types using the put mapping  
> API [1]
> 
> Precisely I'd like to set for some objects the "dynamic" property changing  
> it from false to strict
> 
> I'm executing the following
> 
> curl -X PUT '[http://localhost:9200/my\_index](http://localhost:9200/my_index)'
> 
> curl -X PUT -d  
> '{"my\_type":{"dynamic":"false","properties":{"fields":{"type":"string"}}}}'  
> '[http://localhost:9200/my\_index/my\_type/\_mapping](http://localhost:9200/my_index/my_type/_mapping)'
> 
> curl -X PUT -d  
> '{"my\_type":{"dynamic":"strict","properties":{"fields":{"type":"string"}}}}'  
> '[http://localhost:9200/my\_index/my\_type/\_mapping](http://localhost:9200/my_index/my_type/_mapping)'
> 
> but at the end when I check the resulting mapping
> 
> curl '[http://localhost:9200/my\_index/my\_type/\_mapping](http://localhost:9200/my_index/my_type/_mapping)'
> 
> {"my\_type":{"dynamic":"false","properties":{"fields":{"type":"string"}}}
> 
> I would expect to see the dynamic attribute changed to strict, what am I  
> doing wrong?
> 
> [1]  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping/)
> 
> Thanks in advance for your help
> 
> Paolo
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:24am UTC](https://discuss.elastic.co/t/updating-mapping-dynamic-false-dynamic-strict-unexpected-behaviour/12935/3 "2017-07-06T02:24:27Z")

</div>


