Skip to content

Instantly share code, notes, and snippets.

@jclosure
Created April 18, 2016 20:21
Show Gist options
  • Select an option

  • Save jclosure/fbf93356010f6a035986dc04660e9aeb to your computer and use it in GitHub Desktop.

Select an option

Save jclosure/fbf93356010f6a035986dc04660e9aeb to your computer and use it in GitHub Desktop.
tell elasticsearch not to analyze all fields elasticsearch
curl -X PUT 'http://localhost:9200/_template/template_1' -d '{
"template" : "*",
"mappings": {
"_default_": {
"dynamic_templates": [
{
"string_fields": {
"match": "*",
"match_mapping_type": "string",
"mapping": {
"index": "not_analyzed"
}
}
}
]
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment