In Elasticsearch, one of my field is a date which I define the mapping with custom date format matching my date.
However, some cases the value of my date field is just an empty string "LastUpdateDate": ""
and causes an exception. How can I handle the empty
string in the mapping for the date field?
Unexpected error: (<class 'elasticsearch.helpers.BulkIndexError'>, BulkIndexError(u'1 document(s) failed to index.', [{u'create':
{u'status': 400, u'_type': u'songs', u'_id': u'AVNtiXgTC4kaHLfuKAJA', u'error': {u'caused_by': {u'reason': u'Invalid format: ""',
u'type': u'illegal_argument_exception'}, u'reason': u'failed to parse [LastUpdateDate]', u'type': u'mapper_parsing_exception'},
u'_index': u'album-032016'}}]), <traceback object at 0x7fba4395c1b8>)