Skip to content

Instantly share code, notes, and snippets.

@bonobo78
Last active December 27, 2015 23:29
Show Gist options
  • Save bonobo78/7406562 to your computer and use it in GitHub Desktop.
Save bonobo78/7406562 to your computer and use it in GitHub Desktop.
Set default mapping for a single field
$ curl -XPUT http://127.0.0.1:9200/_template/logstash_per_index -d @file.json
{
"template": "logstash*",
"mappings": {
"_default_": {
"properties": {
"c-user-agent": { "type": "string", "index": "not_analyzed" }
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment