[英]Elastic Search don't return highlight results
I'm sending a request like this: 我正在发送这样的请求:
{
"from": 0,
"query": {
"match": {
"_all": "presidencia"
}
}
,
"aggs": {
//... some aggregations
}
,
"highlight": {
"fields": {
"nomeOrgaoSuperior": {}
}
}
}
But my response doesn't come with highlight field. 但是我的回答并不包含突出显示字段。 Response:
响应:
{
"took": 68,
"timed_out": false,
"_shards": {"total": 15, "successful": 15, "failed": 0},
"hits": {
"total": 692785,
"max_score": 0.48536316,
"hits": [
//Some hits...
]
},
"aggregations": {
//some aggs ...
}
}
Do i need some extra configuration on my index or what? 我是否需要对索引进行一些额外的配置?
Found the problem. 找到了问题。 I was trying to use highlight on field that wasn't analysed by my analyser.
我试图在分析器未分析的字段上使用高光。 So, my search was analysed and the fields i was trying to get the highlight wasn't.
因此,对我的搜索进行了分析,但我没有尝试突出显示的字段没有。 That made the highlighter to never return a match.
这使得荧光笔永远不会返回匹配。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.