Elasticsearch: mapper_parsing_exception: failed to parse field [x] of type [date]
A document value does not fit the field's mapping, so the document was rejected.
Exact message you may see
failed to parse field of typeElasticsearch mapper parsing exception Meaning
Once a field is mapped as date, long or boolean, values of another shape (a string where a number is expected) fail with a 400. The caused_by explains which value.
Common causes
- Value type differs from the mapping (string vs number)
- Date format not matching
format - Dynamic mapping guessed a type from the first document
- Object where a scalar is mapped
⚡ Quick fix
- Fix the data to match the mapping
- Set
formaton date fields - Define explicit mappings instead of relying on dynamic mapping
Detailed fix by platform
Elasticsearch
GET my-index/_mappingthen create a new index with the right mapping and_reindex
How to diagnose
- Field — Which one?
- Mapping — Declared type?
- Value — Actual sent value?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Most viewed in API
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Did this fix work for you?
Report a correction or suggest an improvement
🔍 People also searched
Last updated 2 Dec 2026