试试搜索一下吧

filter中添加对时间过滤后变慢

Elasticsearch | 作者 yilang | 发布于2019年03月26日 | 阅读数:1419

代码如下:
{
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter": [{
"range": {
"created": {
"from": null,
"to": 1544930087000,
"include_lower": true,
"include_upper": false
}
}
}, {
"term": {
"user_id": "1352005_p"
}
}, {
"term": {
"status": 1
}
}]
}
}
}
去掉range后只要10ms左右,加上要3000ms左右,大神们有没有优化方案。
已邀请:

rochy - rochy_he

赞同来自:

请贴一下 ​created 的 mapping 信息

要回复问题请先登录注册