我已经分享了我试图通过映射插入到 Elasticsearch 中的上述数据示例:
elastic_search.indices.put_mapping(
index=index_name_requester,
doc_type=doc_type_requester,
body={
"properties": {
"source_geocode.coordinates": {
"type": "geo_point"
},
"destination_geocode.coordinates": {
"type": "geo_point"
},
"geocodes": {
"type": "geo_shape"
},
"route_box": {
"type": "geo_shape"
},
"start_date_time": {
"type": "date",
"format": "YYYY-MM-dd'T'HH:mm:ss.SSSSSSZ||yyyy-MM-dd||epoch_millis"
}
}
}
)
弹性搜索版本:6.3.2
预期行为:插入成功
当前错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 2, in insertion
File "/home/shobhit/.local/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 76, in _wrapped
return func(*args, params=params, **kwargs)
File "/home/shobhit/.local/lib/python2.7/site-packages/elasticsearch/client/__init__.py", line 319, in index
_make_path(index, doc_type, id), params=params, body=body)
File "/home/shobhit/.local/lib/python2.7/site-packages/elasticsearch/transport.py", line 318, in perform_request
status, headers_response, data = connection.perform_request(method, url, params, body, headers=headers, ignore=ignore, timeout=timeout)
File "/home/shobhit/.local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 186, in perform_request
self._raise_error(response.status, raw_data)
File "/home/shobhit/.local/lib/python2.7/site-packages/elasticsearch/connection/base.py", line 125, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.RequestError: RequestError(400, u'mapper_parsing_exception', u'failed to parse')
但是有一个类似的数据,其中插入了更改的值,我分享了一个指向以下数据的链接:
请帮助弄清楚数据有什么问题。谢谢!