Created
February 8, 2016 09:49
-
-
Save martinhynar/5a77a2cdbd67d837ab80 to your computer and use it in GitHub Desktop.
dynamic mapping to discard temporary fields after logstash processing
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
{ | |
"mappings": { | |
"logs": { | |
"dynamic": "false", | |
"_source": { | |
"excludes": [ | |
"*_" | |
] | |
}, | |
"properties": { | |
"title": { | |
"type": "string" | |
}, | |
"str": { | |
"type": "string", | |
"index": "not_analyzed", | |
"doc_values": true, | |
"fields": { | |
"analyzed": { | |
"type": "string", | |
"index": "analyzed" | |
} | |
} | |
} | |
}, | |
"dynamic_templates": [ | |
{ | |
"discard": { | |
"match": "*_", | |
"mapping": { | |
"index": "no" | |
} | |
} | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment