0
在Elasticsearch中,我的一个字段是一个日期,我使用与我的日期匹配的自定义日期格式来定义映射。Elasticsearch映射空字符串
但是,有些情况下,我的日期字段的值只是一个空字符串"LastUpdateDate": ""
并导致异常。如何处理日期字段映射中空的 字符串?
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>)