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
Closed

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

bleskes opened this issue Aug 9, 2013 · 0 comments

Comments

@bleskes
Copy link
Contributor

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
…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 as completed in 5f4dc54 Aug 9, 2013
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
…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
Projects
None yet
Development

No branches or pull requests

1 participant