Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>
Recently, when using Java API to store es, the following error was reported:
{“took”:150,”errors”:true,”items”:[{“index”:{“_ index”:”test”,”_ type”:”type1″,”_ id”:”794719072″,”status”:400,”error”:{“type”:”mapper_ parsing_ exception”,”reason”:”failed to parse”,”caused_ by”:{“type”:”not_ x_ content_ exception”,”reason”:”Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes”}}}}
After investigation, it is found that during the warehousing process, Java wrongly put the string 1 (“1”) into the warehouse, that is, the data in the following format is put into the warehouse:
{"index":{"_index":"test","_type":"type1"}}
"1"
The above error will be reported. The format of the input data is wrong and mapping cannot parse it
Similar Posts:
- Possible reasons for elasticsearch using curl to guide datagram 400
- Compressor detection can only be called on some ……
- [How to Solve] Failed to convert value of type ‘java.lang.String’ to required type ‘java.util.Date’;
- [923]ElasticSearch 7.4.2 Root mapping definition has unsupported parameters
- [Solved] reason”: “Root mapping definition has unsupported parameters:
- Postman passing Josn field error: Cannot deserialize instance of `java.util.ArrayList` out of VALUE_STRING token
- [Solved] Rsync Error: gid 4294967295 (-1) is impossible to set on…
- [Solved] Element-ui Error: [Vue warn]: Invalid prop: type check failed for prop “index”. Expected String with value “1”, got Number with value 1
- [Solved] layui Error: “layui.js:4 Uncaught TypeError: Cannot create property ‘LAY_TABLE_INDEX’ on string ……”