Created
April 7, 2015 11:30
-
-
Save konradkonrad/16220520eb9bacc1f6e6 to your computer and use it in GitHub Desktop.
Elasticsearch silently ignores mis-structured mapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE localhost:9200/mytest | |
curl -XPUT localhost:9200/mytest | |
curl -XPUT localhost:9200/mytest/t1/_mapping -d '{ | |
"t1": { | |
"_source": {"enabled": false}, | |
"properties": { | |
"_all": {"enabled": false}, | |
"field1": {"type": "string"}, | |
"field2": {"type": "long"}, | |
"_underscore1": {"type": "string"}, | |
"_underscore2": {"enabled": true}}}}' | |
curl -XGET "localhost:9200/_mapping?pretty" | |
# will yield: | |
#{ | |
# "mytest" : { | |
# "mappings" : { | |
# "t1" : { | |
# "_source" : { | |
# "enabled" : false | |
# }, | |
# "properties" : { | |
# "_underscore1" : { | |
# "type" : "string" | |
# }, | |
# "_underscore2" : { | |
# "type" : "object" | |
# }, | |
# "field1" : { | |
# "type" : "string" | |
# }, | |
# "field2" : { | |
# "type" : "long" | |
# } | |
# } | |
# } | |
# } | |
# } | |
#} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment