有没有办法让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