File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,16 @@ curl -H'Content-Type: application/json' -XPUT "http://localhost:9200/oiwiki" -d'
77 "analyzer": {
88 "pinyin_analyzer": {
99 "tokenizer": "ik_max_word",
10- "filter": "pinyin_filter"
10+ "filter": "pinyin_filter",
11+ "char_filter": ["special_mapping"]
1112 },
1213 "pinyin_search_analyzer": {
13- "tokenizer": "ik_max_word"
14+ "tokenizer": "ik_max_word",
15+ "char_filter": ["special_mapping"]
1416 },
1517 "ngram_analyzer": {
16- "tokenizer": "ngram_tokenizer"
18+ "tokenizer": "ngram_tokenizer",
19+ "char_filter": ["special_mapping"]
1720 }
1821 },
1922 "filter": {
@@ -31,6 +34,17 @@ curl -H'Content-Type: application/json' -XPUT "http://localhost:9200/oiwiki" -d'
3134 "max_gram": 9,
3235 "token_chars": ["letter", "digit"]
3336 }
37+ },
38+ "char_filter": {
39+ "special_mapping":{
40+ "type": "mapping",
41+ "mappings": [
42+ "@=>.oiwikiAt.",
43+ "#=>.oiwikiJin.",
44+ "!=>.oiwikiSigh.",
45+ "*=>.oiwikiXing."
46+ ]
47+ }
3448 }
3549 }
3650 },
You can’t perform that action at this time.
0 commit comments