Changing the dynamic mapping setting on an existing mapping

How can I turn off dynamic mapping for an existing mapping? Is it possible
to do it on the fly, or I need to do it when I create the mapping?

Here's a set of commands I tried to test this:

It looks like setting the dynamic setting to "strict" after the mapping
creation does not work, and new documents added with fields not specified
in the original mapping will change the mapping definition.

-Tudor

--

Hi Tudor,

The dynamic property can't be modified on an existing mapping. If
the dynamic property is specified on the top level then the only
option I see now is to create a new mapping. You can specify dynamic
also on any object type inside your mapping. If that is the case then
you can add a new field of type object with a different dynamic
setting. In any case you still need to update your documents.

Martijn

On 7 December 2012 17:51, Tudor Leu tudor@foursquare.com wrote:

How can I turn off dynamic mapping for an existing mapping? Is it possible
to do it on the fly, or I need to do it when I create the mapping?

Here's a set of commands I tried to test this:
Elasticsearch - changing dynamic mapping to strict · GitHub

It looks like setting the dynamic setting to "strict" after the mapping
creation does not work, and new documents added with fields not specified in
the original mapping will change the mapping definition.

-Tudor

--

--
Met vriendelijke groet,

Martijn van Groningen

--