Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elastic Search Bulk Request length

I get this error when I try to push data:

[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]}]

Can I extend the length in elasticsearch? And If so in the yml File or via curl?

Also I am getting :

Limit of total fields [1000] in index [sw_shop5_20170928231741] has been exceeded

I tried to set it with the curl-call:

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

But this I can only apply when the index is up already - the software I use always generates a new index and setting it in the eleasticsearch.yml is not possible because I get this:

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" }'

With setting this: index.mapping.total_fields.limit: 100000

like image 647
Isengo Avatar asked Nov 08 '22 16:11

Isengo


1 Answers

Check the full stack trace in the ES log in the server. I got this same error and the stack trace pointed to a mapping issue:

java.lang.IllegalArgumentException: mapper [my_field] of different type, current_type [keyword], merged_type [text]
like image 53
Daniel Avatar answered Nov 15 '22 10:11

Daniel