Skip to content

Instantly share code, notes, and snippets.

@msimos
Created September 10, 2015 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msimos/1e080f47870a9b309444 to your computer and use it in GitHub Desktop.
Save msimos/1e080f47870a9b309444 to your computer and use it in GitHub Desktop.
Set doc_values to true for all dynamic fields in the logstash template
{
"template" : "logstash-*",
"settings" : {
"index.refresh_interval" : "5s",
"index.query.default_field": "message"
},
"mappings" : {
"_default_" : {
"dynamic_templates" : [ {
"string_fields" : {
"mapping" : {
"index" : "analyzed",
"omit_norms" : true,
"type" : "string",
"fields" : {
"raw" : {
"ignore_above" : 256,
"index" : "not_analyzed",
"type" : "string",
"doc_values" : true
}
}
},
"match_mapping_type" : "string",
"match" : "*"
}},
{
"other_fields" : {
"match": "*",
"match_mapping_type": "*",
"mapping": {
"doc_values" : true
}
}
}
],
"_all" : {
"enabled" : false
},
"properties" : {
"geoip" : {
"path" : "full",
"dynamic" : true,
"type" : "object",
"properties" : {
"location" : {
"type" : "geo_point",
"doc_values" : true
}
}
},
"@version" : {
"index" : "not_analyzed",
"type" : "string",
"doc_values" : true
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment