DBAtlas · Database operations atlas

mapper_parsing_exception: mapper_parsing_exception: failed to parse field [...] of type [...]

Elasticsearch

What does it mean?

While indexing a document, the value sent for a field did not match the type defined for that field in the mapping and could not be parsed. For example, text sent to a field defined as integer, or an invalid date format sent to a field defined as date.

Why does it happen?

Field type mismatch (a string for a numeric field, a malformed format for a date field), a date that does not match the expected date format, malformed/incomplete JSON, dynamically mistyped fields, or a scalar value sent where an object is expected.

How to fix it

Check the field name and expected type in the error message: GET /index-name/_mapping. Make the value in the document match the field type, or redefine the mapping with the correct type. For date fields, match the format parameter to the document format. The type of an existing field cannot be changed; if needed, create a new index and move the data with _reindex. Validate data in the application layer.

Open in DBAtlas →

More from this engine