{
"index": {
"number_of_shards": 3,
"number_of_replicas": 1,
"analysis": {
"analyzer": {
"company_analyzer": {
"tokenizer": "standard",
"filter": "pinyin_filter"
}
},
"filter": {
"pinyin_filter": {
"type": "pinyin",
"keep_joined_full_pinyin": true,
"keep_original": true,
"limit_first_letter_length": 16,
"remove_duplicated_term": true
}
}
}
}
}
POST /recruitment1/_analyze
{
"analyzer": "company_analyzer",
"text": "开发"
}
{
"tokens" : [
{
"token" : "kai",
"start_offset" : 0,
"end_offset" : 2,
"type" : "CN_WORD",
"position" : 0
},
{
"token" : "fa",
"start_offset" : 0,
"end_offset" : 2,
"type" : "CN_WORD",
"position" : 1
},
{
"token" : "开发",
"start_offset" : 0,
"end_offset" : 2,
"type" : "CN_WORD",
"position" : 1
},
{
"token" : "kaifa",
"start_offset" : 0,
"end_offset" : 2,
"type" : "CN_WORD",
"position" : 1
},
{
"token" : "kf",
"start_offset" : 0,
"end_offset" : 2,
"type" : "CN_WORD",
"position" : 1
}
]
}
就没有单独的开
搜索开的时候出现开发高亮