有没有办法在elasticsearch中按_score进行过滤?

Dmi*_*kin 6 elasticsearch elasticsearch-2.0

有没有办法使以下post_filter查询有效?

我尝试过不同的方法:_scorescoredoc.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": []
}
Run Code Online (Sandbox Code Playgroud)

ES组的类似问题:http://elasticsearch-users.115913.n3.nabble.com/Filter-on-score-td4044742.html