Created
June 25, 2022 20:07
-
-
Save KnowledgeGarden/4731b573f52f4458cbf8c104c96a196d to your computer and use it in GitHub Desktop.
Mapping issues
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error encountered: | |
co.elastic.clients.elasticsearch._types.ElasticsearchException: [es/index] failed: [mapper_parsing_exception] | |
failed to parse field [details] of type [text] in document with id '1656187419178'. Preview of field's value: '{en=Funky label}' | |
Consider this JSON | |
{"lox":"1656187419178","details":{"en":"Funky label"},"label":{"en":"Funky label"}} | |
And this mappings template: | |
{ | |
"mappings": { | |
"properties": { | |
"lox": { | |
"type": "keyword", | |
"store": true | |
}, | |
"label": { | |
"type": "text", | |
"analyzer": "standard", | |
"fields": { | |
"en": { | |
"type": "text", | |
"analyzer": "english" | |
}, | |
"fr": { | |
"type": "text", | |
"analyzer": "french" | |
}, | |
"de": { | |
"type": "text", | |
"analyzer": "german" | |
} | |
} | |
}, | |
"details": { | |
"type": "text", | |
"analyzer": "standard", | |
"fields" : { | |
"en": { | |
"type": "text", | |
"analyzer": "english", | |
"store": true | |
}, | |
"fr": { | |
"type": "text", | |
"analyzer": "french", | |
"store": true | |
}, | |
"de": { | |
"type": "text", | |
"analyzer": "german", | |
"store": true | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment