Created
February 9, 2012 15:25
-
-
Save wesplunk/1780664 to your computer and use it in GitHub Desktop.
elastic search dynamic mapping issue
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
{ | |
"template": "*", | |
"settings": { | |
"number_of_shards": 2, | |
"number_of_replicas": 1, | |
"search": { | |
"slowlog": { | |
"level": "trace", | |
"threshold": { | |
"query": { | |
"warn": "10s", | |
"info": "5s", | |
"debug": "2s", | |
"trace": "500ms" | |
}, | |
"fetch": { | |
"warn": "1s", | |
"info": "800ms", | |
"debug": "500ms", | |
"trace": "200ms" | |
} | |
} | |
} | |
}, | |
"analysis": { | |
"analyzer": { | |
"defaultAnalyzerForStringSorting": { | |
"type": "custom", | |
"char_filter": "html_strip", | |
"tokenizer": "keyword", | |
"filter": [ | |
"icu_normalizer" | |
] | |
}, | |
"defaultAnalyzerForStringSearching": { | |
"type": "custom", | |
"char_filter": "html_strip", | |
"tokenizer": "uax_url_email", | |
"filter": [ | |
"icu_normalizer" | |
] | |
} | |
} | |
} | |
}, | |
"mappings": { | |
"catchAll": { | |
"_all": { | |
"enabled": false | |
}, | |
"_source": { | |
"enabled": false | |
}, | |
"numeric_detection": true, | |
"date_detection": true, | |
"dynamic_templates": [ | |
{ | |
"stringMappingTemplate": { | |
"match": "*", | |
"match_mapping_type": "string", | |
"mapping": { | |
"type": "string", | |
"store": "yes", | |
"index": "analyzed", | |
"analyzer": "defaultAnalyzerForStringSearching" | |
} | |
} | |
} | |
] | |
} | |
} | |
} |
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
{} |
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
{ | |
"strField1": "hello this is my first string field. I hope you enjoy it" | |
} |
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
{ | |
_index: test | |
_type: catchAll | |
_id: TOMAxqmtQzGZIuO-qDu5VA | |
_version: 1 | |
_score: 1 | |
} |
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
properties: { | |
strField1: { | |
store: yes | |
,analyzer: defaultAnalyzerForStringSearching | |
,type: string | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment