Analyzers 是由一个 Tokenizer 和任意个数的 TokenFilters 组成:
curl -XPUT "http://localhost:9200/yyyy" -H 'Content-Type: application/json' -d' { "settings": { "analysis": { "analyzer": { "default": { "type": "custom", "tokenizer": "ik_smart", "char_filter": [ "html_strip" ], "filter": [ "pinyin_filter", "lowercase", "stop", "ngram_1_20" ] }, "default_search": { "type": "custom", "tokenizer": "ik_smart", "char_filter": [ "html_strip" ] } }, "filter": { "ngram_1_20": { "type": "ngram", "min_gram": 1, "max_gram": 20, "token_chars": [ "letter", "digit" ] }, "pinyin_filter": { "type": "pinyin", "keep_original": true, "keep_joined_full_pinyin": true } } } } }'