每个函数的ES function_score min_score

时间:2018-05-15 07:39:09

标签: elasticsearch

如果我在ElasticSearch查询中有:

{
  "query": {
    "function_score": {
      "query": {
        "match_all": {}
      },
      "boost": "5",
      "functions": [
        {
          "filter": {
            "match": {
              "test": "bar"
            }
          },
          "random_score": {},
          "weight": 23
        },
        {
          "filter": {
            "match": {
              "test": "foo"
            }
          },
          "weight": 42
        }
      ],
      "max_boost": 42,
      "score_mode": "max",
      "boost_mode": "multiply",
      "min_score": 42
    }
  }
}

是否可以为每个函数的结果设置min_score? 我想设置2个min_scores,一个用于foo的第二个。

0 个答案:

没有答案