Skip to content

Instantly share code, notes, and snippets.

@gtt116
Created November 10, 2016 06:55
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 gtt116/a920012addf9df6b9e39a1b285f0f2f8 to your computer and use it in GitHub Desktop.
Save gtt116/a920012addf9df6b9e39a1b285f0f2f8 to your computer and use it in GitHub Desktop.
Make default string in elasticsearch not analyze
curl -XPUT 192.168.1.223:9200/_template/template_not_analyzed -d '{
"template": "*",
"mappings": {
"_default_": {
"_all": {
"enabled": true
},
"dynamic_templates": [
{
"string_fields": {
"match": "*",
"match_mapping_type": "string",
"mapping": {
"index": "not_analyzed",
"omit_norms": true,
"type": "string"
}
}
}
]
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment