首页 新闻 赞助 找找看

C#代码ES索引精确查询

0
[已关闭问题] 关闭于 2022-08-12 16:32

var searchResponse = client.Search<Conditions>(s => s
.From(0)
.Size(10)
.Query(q => q
.MatchPhrase(m=>m
.Field(f=>f.Name)
.Query(name)
)
)
);

加上keywork

GET my_index2/_search
{
"query": {
"match_phrase": {
"name.keyword": "张三"
}
}
}

宋人鱼的主页 宋人鱼 | 初学一级 | 园豆:14
提问于:2022-08-04 15:21
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册