0

弹性搜索版本:7.6.2

虚拟机:13.0.2

操作系统版本:centeros7

这是我的代码

POST  recommend_index/_update_by_query  

{
               "script": {
            "source": "ctx._source.rec_doctor_id = 1"
        },
               "query": {
                    "bool": {
                "must": [{
                            "terms": {
                                "id": ["22222"]
                            }
                             }]
                    }
                           }
         }

此代码没有正确返回结果,错误信息是

{
  "error": {
    "root_cause": [
      {
        "type": "exception",
        "reason": "Trying to create too many scroll contexts. Must be less than or equal to: [5000]. This limit can be set by changing the [search.max_open_scroll_context] setting."
      }
    ],
    "type": "search_phase_execution_exception",
    "reason": "Partial shards failure",
    "phase": "query",
    "grouped": true,
    "failed_shards": [
      {
        "shard": 1,
        "index": "recommend_index",
        "node": "XXX",
        "reason": {
          "type": "exception",
          "reason": "Trying to create too many scroll contexts. Must be less than or equal to: [5000]. This limit can be set by changing the [search.max_open_scroll_context] setting."
        }
      }
    ]
  },
  "status": 500
}

我确定当前滚动为 0

当我用 _UPDATE 替换 _UPDATE_BY_QUERY 时,它会正常更新

ES从上周五就没有改过,突然报错

没有对 ES 服务器进行任何配置更改

4

1 回答 1

0

后续:我将search.max_open_scroll_context参数设置为5000,发现与它无关。我查看了 7.6.2 版本,发现有人和我有同样的问题。链接在这里#71354 #56202 我猜这是由于滚动触发了 7.6.2 错误。我重新启动了集群节点而没有升级和发现它有效!

于 2021-04-15T04:02:00.713 回答