Created
November 10, 2016 06:55
-
-
Save gtt116/a920012addf9df6b9e39a1b285f0f2f8 to your computer and use it in GitHub Desktop.
Make default string in elasticsearch not analyze
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
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