Skip to content

Instantly share code, notes, and snippets.

@lancespeelmon
Last active September 22, 2015 17:23
Show Gist options
  • Save lancespeelmon/f4d947acf187a50c84ca to your computer and use it in GitHub Desktop.
Save lancespeelmon/f4d947acf187a50c84ca to your computer and use it in GitHub Desktop.
ELK dynamic map numbers to strings
{
"mappings": {
"asn": {
"dynamic_templates": [
{
"all_strings": {
"mapping": {
"type": "string",
"index": "analyzed",
"fields": {
"raw": {
"index": "not_analyzed",
"type": "string"
},
"long": {
"index": "not_analyzed",
"type": "long",
"ignore_malformed": true
},
"double": {
"index": "not_analyzed",
"type": "double",
"ignore_malformed": true
}
}
},
"match": "*",
"match_mapping_type": "string"
}
},
{
"all_longs": {
"mapping": {
"type": "string",
"index": "analyzed",
"fields": {
"raw": {
"index": "not_analyzed",
"type": "string"
},
"long": {
"index": "not_analyzed",
"type": "long",
"ignore_malformed": true
},
"double": {
"index": "not_analyzed",
"type": "double",
"ignore_malformed": true
}
}
},
"match": "*",
"match_mapping_type": "long"
}
},
{
"all_doubles": {
"mapping": {
"type": "string",
"index": "analyzed",
"fields": {
"raw": {
"index": "not_analyzed",
"type": "string"
},
"long": {
"index": "not_analyzed",
"type": "long",
"ignore_malformed": true
},
"double": {
"index": "not_analyzed",
"type": "double",
"ignore_malformed": true
}
}
},
"match": "*",
"match_mapping_type": "double"
}
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment