Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_default_ mapping change is validated is if it was a normal type #3476

Closed
bleskes opened this Issue Aug 9, 2013 · 0 comments

Comments

Projects
None yet
1 participant
@bleskes
Copy link
Member

bleskes commented Aug 9, 2013

Changes to mappings of types in ES are subject to certain validation. For example, if a field was previously analyzed, it is impossible to set it to be not analyzed as this will create inconsistencies with existing data.

The _default_ mapping are used for new type creation and therefore it shouldn't be problem to change any setting there.

To reproduced:

curl -XPOST "http://localhost:9200/test" -d'
{
   "mappings": {
      "_default_": {
         "properties": {
            "f": {
                "type": "string", 
                "index": "analyzed"
            }
         }
      }
   }
}'

And then a change:

curl -XPOST "http://localhost:9200/test/_default_/_mapping" -d'
{
   "_default_": {
        "properties": {
            "f": {
                "type": "string", 
                "index": "not_analyzed"
            }
        }
   }
}'

Which results in an MergeMappingException

@ghost ghost assigned bleskes Aug 9, 2013

bleskes added a commit that referenced this issue Aug 9, 2013

when changing the mapping of the _default_ mapping, do not apply the …
…old _default_ mapping to the new one and also do not validate the new version with a merge but parse is as a new type.

Closes #3474, Closes #3476

@bleskes bleskes closed this in 5f4dc54 Aug 9, 2013

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

when changing the mapping of the _default_ mapping, do not apply the …
…old _default_ mapping to the new one and also do not validate the new version with a merge but parse is as a new type.

Closes elastic#3474, Closes elastic#3476
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.