Skip to content

Instantly share code, notes, and snippets.

@piavlo
Created October 24, 2013 15:17
Show Gist options
  • Save piavlo/7139097 to your computer and use it in GitHub Desktop.
Save piavlo/7139097 to your computer and use it in GitHub Desktop.
Adding dynamic mapping to a "extra" key/value container blob
curl -XPUT localhost:9200/apache-accesslog-2013.10.24/apache-accesslog/_mapping -d '{
"apache-accesslog": {
"properties":{
"@fields": {
"properties": {
"extra" : {
"type" : "object",
"dynamic" : "true",
"include_in_all" : true
}
}
}
}
}
}'
curl -XPUT localhost:9200/apache-accesslog-2013.10.24/_default_/_mapping -d '{
"_default_": {
"properties":{
"@fields": {
"properties": {
"extra" : {
"type" : "object",
"dynamic" : "true",
"include_in_all" : true
}
}
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment