Empty date is not getting detected!

I have below dynamic mapping for index "my_index"
PUT my_index
"mappings": {
"dynamic_templates": [
"objects": {
"match_mapping_type": "object",
"mapping": {
"type": "nested"
"dynamic_date_formats": "yyyy-MM-dd||yyyy-MM-dd HH:mm:ss"

Now, when I am inserting data into es. It is giving me below error like:
org.elasticsearch.hadoop.rest.EsHadoopRemoteException: mapper_parsing_exception: failed to parse field [raw_derived.applications.accounts.dateclosed] of type [date] in document with id '02cf10ae-93c4-45a3-99bb-a0d01f24fa86'. Preview of field's value: '';org.elasticsearch.hadoop.rest.EsHadoopRemoteException: illegal_argument_exception: cannot parse empty date

there is field called "dateclosed". It is having value or sometimes empty values.
How can I set dynamically in the mapping to ignore empty value from date fields?

Any suggestion would be helpful.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.