0
我有用NEST(c#)编写的percolate函数。我想启用突出显示功能但不起作用。渗滤器工作正常,但突出显示没有返回任何东西,在NEST文档中没有发现任何东西。任何帮助非常感谢。在NEST中写入的Percolate函数中突出显示Elasticsearch
var searchResponseDoc = client.Search<PercolatedQuery>(s => s
.Query(q => q
.Percolate(f => f
.Field(p => p.Query)
.DocumentType<Document>() //I have a class called Document
.Document(myDocument))) // myDocument is an object of type Document
.Highlight(h => h
.Fields(f => f
.Field(p => p.Query))
.PreTags("<em>")
.PostTags("</em>")
.FragmentSize(20)));
它的工作原理,非常感谢。 – Abdulaziz