有没有办法做 post_filter
查询有效?
我尝试了不同的: _score
, score
, doc.score
, doc._score
, _source.score
等没有什么工作 .
我相信应该有一些解决方案允许你按分数过滤 post_filter
.
{
"body": {
"post_filter": {
"script": {
"script": "_score > 100 && _score < 200"
}
},
"query": {
"function_score": {
"functions": [{
"script_score": {
"script": "doc['price'].value * 100"
}
}]
}
}
},
"index": ["items"],
"type": []
}
关于ES组的类似问题:http://elasticsearch-users.115913.n3.nabble.com/Filter-on-score-td4044742.html