|
|
Posted on 1/9/2019 10:29:11 AM
|
|
|
|

Error reason
{ "error": { "root_cause": [
{ "type": "mapper_parsing_exception", "reason": "No handler for type [string] declared on field [upload_status]"
} ], "type": "mapper_parsing_exception", "reason": "No handler for type [string] declared on field [upload_status]" }, "status": 400
}
I am using Elasticsearch version 6.2.2 and when creating fields according to the school documentation, I use {"type":"string","index":"not_analyzed"}.
Cause analysis
After checking the spelling, I decided to check the new version of Elasticsearch features, because I had also stepped on the pit of the installation method of the head plugin before, because of the version problem. Sure enough, Elasticsearch introduced text and keyword from 5.X, where keyword is applied to non-segmentation fields, and can only match exactly when searching, at which point the string is still retained.
arrived6.X completely removes the stringFinish.
Other than thatThe value of "index" can only be a boolean variable。
Workaround
{"type":"text","index":false}
So, the json modification is as follows:
But there are new errors that are as follows:
{ "error": { "root_cause": [
{ "type": "illegal_argument_exception", "reason": "Rejecting mapping update to [restraunt] as the final mapping would have more than 1 type: [record, info]"
} ], "type": "illegal_argument_exception", "reason": "Rejecting mapping update to [restraunt] as the final mapping would have more than 1 type: [record, info]" }, "status": 400
} This is due to:A major change in Elasticsearch 6.x where Mapping only allows one type。 Indexes created in 5.x with multiple mapping types will continue to run in Elasticsearch 6.x as before. Mapping types will be completely removed in Elasticsearch 7.0.0.
After Elasticsearch 7.x release, the parameter in typeURL is optional. For example, indexing documents no longer requires a document type
Resources:
https://github.com/sirensolutions/sentinl/issues/257
https://www.elastic.co/guide/en/ ... moval-of-types.html
|
Previous:MD5 encryptionNext:How does C# code make your computer shut down, restart, log out, lock, shut down...
|