https://github.com/medcl/elasticsearch-analysis-pinyin
Optional Parameters
keep_first_letter
when this option enabled, eg:刘德华
>ldh
, default: truekeep_separate_first_letter
when this option enabled, will keep first letters separately, eg:刘德华
>l
,d
,h
, default: false, NOTE: query result maybe too fuzziness due to term too frequencylimit_first_letter_length
set max length of the first_letter result, default: 16keep_full_pinyin
when this option enabled, eg:刘德华
> [liu
,de
,hua
], default: truekeep_joined_full_pinyin
when this option enabled, eg:刘德华
> [liudehua
], default: falsekeep_none_chinese
keep non chinese letter or number in result, default: truekeep_none_chinese_together
keep non chinese letter together, default: true, eg:DJ音乐家
->DJ
,yin
,yue
,jia
, when set tofalse
, eg:DJ音乐家
->D
,J
,yin
,yue
,jia
, NOTE:keep_none_chinese
should be enabled firstkeep_none_chinese_in_first_letter
keep non Chinese letters in first letter, eg:刘德华AT2016
->ldhat2016
, default: truekeep_none_chinese_in_joined_full_pinyin
keep non Chinese letters in joined full pinyin, eg:刘德华2016
->liudehua2016
, default: falsenone_chinese_pinyin_tokenize
break non chinese letters into separate pinyin term if they are pinyin, default: true, eg:liudehuaalibaba13zhuanghan
->liu
,de
,hua
,a
,li
,ba
,ba
,13
,zhuang
,han
, NOTE:keep_none_chinese
andkeep_none_chinese_together
should be enabled firstkeep_original
when this option enabled, will keep original input as well, default: falselowercase
lowercase non Chinese letters, default: truetrim_whitespace
default: trueremove_duplicated_term
when this option enabled, duplicated term will be removed to save index, eg:de的
>de
, default: false, NOTE: position related query maybe influencedignore_pinyin_offset
after 6.0, offset is strictly constrained, overlapped tokens are not allowed, with this parameter, overlapped token will allowed by ignore offset, please note, all position related query or highlight will become incorrect, you should use multi fields and specify different settings for different query purpose. if you need offset, please set it to false. default: true.