curl -XPUT http://localhost:9200/medcl-d -d '
{
"index": {
"analysis": {
"analyzer": {
"pinyin_analyzer": {
"tokenizer": "my_pinyin"
}
},
"tokenizer": {
"my_pinyin": {
"type": "pinyin",
"keep_first_letter": false,
"keep_separate_first_letter": true,
"keep_full_pinyin": false,
"keep_original": false,
"limit_first_letter_length": 16,
"lowercase": true
}
}
}
}
}'
curl -XPOST http://localhost:9200/medcl-d/folks/andy -d'
{"name":"刘德华"}'
curl -XGET http://localhost:9200/medcl-d/folks/_search?pretty -d '
{
"query": {
"match_phrase": {
"name.pinyin": "dh"
}
}
}'
3 个回复
wengqiankun - es新手
赞同来自:
gzliudan
赞同来自:
匿名用户
赞同来自: