弹性搜索批量请求长度

时间:2017-09-28 21:14:42

标签: elasticsearch shopware

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

[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 -XPUT'localhost:9200 / _all / _settings'-d'{“index.mapping.total_fields.limit”:1000000}'

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

Since elasticsearch 5.x index level settings can NOT be set on the nodes 
configuration like the elasticsearch.yaml, in system properties or command line 
arguments.In order to upgrade all indices the settings must be updated via the 
/${index}/_settings API. Unless all settings are dynamic all indices must be closed 
in order to apply the upgradeIndices created in the future should use index templates 
to set default values. 

Please ensure all required values are updated on all indices by executing: 

curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{
  "index.mapping.total_fields.limit" : "100000"
}'

设置此项: index.mapping.total_fields.limit:100000

1 个答案:

答案 0 :(得分:0)

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

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