【问题标题】:Elastic Search Bulk Request length弹性搜索批量请求长度
【发布时间】:2018-03-10 17:52:40
【问题描述】:

当我尝试推送数据时出现此错误:

[2017-09-28T22:58:13,583][DEBUG][o.e.a.b.TransportShardBulkAction] 
[fE76H5K] [sw_shop5_20170928225616][3] failed to execute bulk item 
(index) BulkShardRequest [[sw_shop5_20170928225616][3]] containing 
[index {[sw_shop5_20170928225616][product][A40482001], source[n/a, 
actual length: [41.6kb], max length: 2kb]}]

我可以在 elasticsearch 中延长长度吗?如果是在 yml 文件中或通过 curl?

我也得到了:

已超出索引 [sw_shop5_20170928231741] 中总字段 [1000] 的限制

我尝试使用 curl-call 设置它:

curl -XPUT 'localhost:9200/_all/_settings' -d ' { "index.mapping.total_fields.limit": 1000000 }'

但是我只能在索引已经建立时应用 - 我使用的软件总是会生成一个新索引并将其设置在 eleasticsearch.yml 中是不可能的,因为我得到了这个:

由于 elasticsearch 5.x 索引级别设置不能像 elasticsearch.yaml 那样在系统属性或命令行参数中设置节点配置。为了升级所有索引,必须通过 /${index 更新设置}/_settings API。除非所有设置都是动态的,否则必须关闭所有索引才能应用 upgradeIndices 将来创建的索引应使用索引模板来设置默认值。

请确保通过执行以下命令更新所有索引上的所有必需值: curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{ "index.mapping.total_fields.limit" : "100000" }'

通过设置: index.mapping.total_fields.limit: 100000

【问题讨论】:

    标签: elasticsearch shopware


    【解决方案1】:

    在服务器的 ES 日志中检查完整的堆栈跟踪。 我遇到了同样的错误,堆栈跟踪指出了一个映射问题:

    java.lang.IllegalArgumentException: mapper [my_field] of different type, current_type [keyword], merged_type [text]
    

    【讨论】:

      猜你喜欢
      • 2020-11-20
      • 2019-06-03
      • 1970-01-01
      • 2012-11-29
      • 2022-06-16
      • 1970-01-01
      • 1970-01-01
      • 2016-04-26
      • 1970-01-01
      相关资源
      最近更新 更多