简体   繁体   English

enrich.fetch_size Elasticsearch 参数的值可以以某种方式增加吗?

[英]Can the value of the enrich.fetch_size Elasticsearch parameter be increased somehow?

enrich.fetch_size - Maximum batch size when reindexing a source index into an enrich index. enrich.fetch_size - 将源索引重新索引为丰富索引时的最大批量大小。 Defaults to 10000.默认为 10000。

When the value is changed in elasticsearch.yml to ex.elasticsearch.yml中的值更改为 ex 时。 20000, the error appears when executing ingest policy 20000,执行ingest policy时出现错误

{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "Batch size is too large, size must be less than or equal to: [10000] but was [20000]. Scroll batch sizes cost as much memory as result windows so they are controlled by the [index.max_result_window] index level setting."
      }
    ],
    "type" : "search_phase_execution_exception",
    "reason" : "Partial shards failure",
    "phase" : "query",
    "grouped" : true,
    "failed_shards" : [
      {
        "shard" : 0,
        "index" : "name-of-index",
        "node" : "node-id",
        "reason" : {
          "type" : "illegal_argument_exception",
          "reason" : "Batch size is too large, size must be less than or equal to: [10000] but was [20000]. Scroll batch sizes cost as much memory as result windows so they are controlled by the [index.max_result_window] index level setting."
        }
      }
    ]
  },
  "status" : 400
}

config file:配置文件:

...
discovery:
  seed_hosts:
    - "127.0.0.1"
    - "[::1]"
    - elasticsearch

script:
  context:
    template:
      max_compilations_rate: 400/5m
      cache_max_size: 400

enrich:
  fetch_size: 20000
...

This is pretty common mistake, I think you have not restarted you Elasticsearch server and the new changes of elasticsearch.yml is not loaded.这是一个很常见的错误,我认为你没有重新启动你的 Elasticsearch 服务器并且没有加载 elasticsearch.yml 的新变化。

If its not resolved after restart then share your config file.如果重新启动后仍未解决,请共享您的配置文件。 Will have to take a look at it.将不得不看看它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM