Created
January 16, 2015 12:25
-
-
Save ypasmk/df441c24a7de0f8ceb69 to your computer and use it in GitHub Desktop.
ElasticSearch dynamic_date_formats is not applied if there is a mapping created with the index
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 "http://localhost:9200/myindex" | |
curl -XPOST "http://localhost:9200/myindex/" -d ' | |
{ | |
"state": "open", | |
"mappings": { | |
"message": { | |
} | |
} | |
}' | |
curl -XPOST "http://localhost:9200/myindex/_mapping/message" -d ' | |
{ | |
"message": { | |
"dynamic_templates": [], | |
"dynamic_date_formats": [ | |
"dd.MM.yyyy" | |
], | |
"properties": { | |
"myfield": { | |
"type": "string" | |
} | |
} | |
} | |
}' | |
curl -XDELETE "http://localhost:9200/myindex" | |
curl -XPOST "http://localhost:9200/myindex/" | |
curl -XPOST "http://localhost:9200/myindex/_mapping/message" -d ' | |
{ | |
"message": { | |
"dynamic_templates": [], | |
"dynamic_date_formats": [ | |
"dd.MM.yyyy" | |
], | |
"properties": { | |
"myfield": { | |
"type": "string" | |
} | |
} | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment