文章40 | 阅读 24063 | 点赞0
#前缀匹配查询
#前缀匹配查询
GET /lib3/user/_search
{
"query": {
"match_phrase_prefix": {
"name":{"query":"zhao"}
}
}
}
{
"took" : 59,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 2,
"max_score" : 0.6931472,
"hits" : [
{
"_index" : "lib3",
"_type" : "user",
"_id" : "2",
"_score" : 0.6931472,
"_source" : {
"name" : "zhaoming",
"address" : "bei jing hai dian qu qing he zhen",
"age" : 20,
"birthday" : "1998-10-12",
"interests" : "xi huan hejiu, duanlian, changge"
}
},
{
"_index" : "lib3",
"_type" : "user",
"_id" : "1",
"_score" : 0.2876821,
"_source" : {
"name" : "zhaoliu",
"address" : "hei long jiang sheng tie ling shi",
"age" : 50,
"birthday" : "1970-12-12",
"interests" : "xi buan hejiu, duanlian, lvyou"
}
}
]
}
}
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/ywl470812087/article/details/104876861
内容来源于网络,如有侵权,请联系作者删除!