如同磁铁吸引四周的铁粉,热情也能吸引周围的人,改变周围的情况。

es 搜索 使用highlight 后查询效率相当慢的问题

Elasticsearch | 作者 y358625210 | 发布于2018年10月11日 | 阅读数:4300

post:/news/_search
{
"highlight": {
"fields": {
"title": {

},
"content": {}
},
"fragment_size": 45,
"number_of_fragments": 2
},
"size": 15,
"query": {
"bool": {
"filter": ,
"must": [{
"match": {
"content": "中华人民"
}
},
{
"match": {
"title": "中华人民"
}
}]
}
},
"from": 0,
"_source": {
"excludes": ["content"]
}
}
分词器使用的NLP
不使用highlight 时候查询只需要10ms 添加highlight后 查询为2300ms
有大神遇到过问题没
已邀请:

rochy - rochy_he

赞同来自:

你 content 的内容文字多么?
ES 的版本是多少?

要回复问题请先登录注册