【发布时间】:2017-12-20 04:06:13
【问题描述】:
我正在为以下查询搜索返回突出显示结果。需要一些帮助来为我指明正确的方向。\
使用 Nest 5.4.0 和 ElasticSearch 服务器 5.5.0
var results = client.Search<Customer>(s => s
.Query(q => q.QueryString(qs=>qs.Query(searchTerm)))
.Highlight(h=>
h.Fields(f=>
f.Field("*")
.HighlightQuery(q =>
q.QueryString(qs => s.Query(searchTerm))))
));
这里是请求 JSON
{
"highlight": {
"fields": {
"*": {
"highlight_query": {
"query_string": {
"query": "a"
}
}
}
}
},
"query": {
"query_string": {
"query": "a"
}
}
}
【问题讨论】:
-
你能发布实际的http请求吗
-
我添加了请求 JSON。
标签: c# elasticsearch nest