【发布时间】:2020-02-01 18:17:58
【问题描述】:
我正在尝试使用单文档 API 在 Elasticsearch 中插入多个索引。我有大约 9000 个多个索引。而且每个索引都有多个文档。
单文档API:es.index(index=myObject._id, doc_type=doc_name, body=records,request_timeout=40)
在插入 499 个随机索引(具有多个文档)后,该过程开始正常但有趣的是,我在插入操作期间收到错误。
错误是:
RequestError(400, 'illegal_argument_exception', '[9de9df3c092bfd8ae79870249a31cf28][x.x.x.x:9300][indices:admin/create]').
我在 AWS 上运行 Elasticsearch,我正在使用 Python Elasticsearch Client
编辑:
我做了一个小实验。
for index_ in range(0,1000,1):
wb_record=dict()
wb_record['md']=0
es.index(index=str(index_), doc_type='wellbore_data', body=wb_record,request_timeout=100)
我还是遇到了同样的错误
RequestError: RequestError(400, 'illegal_argument_exception', '[72a30a0a1c8b23082c09610fd1bc32a8][x.x.x.x:9300][indices:admin/create]')
有没有人可以帮我解决这个错误?
谢谢
【问题讨论】:
-
您能否说明您是在 AWS EC2 上运行 ES 还是在 AWS ES 托管服务上运行?
-
这是 AWS Elastic Search Service(托管)
-
@Val Hi Val,我在 AWS ES 托管服务上运行。
-
你是 streaming your ES logs Cloudwatch 吗?
-
是的,我正在流式传输到 Cloudwatch
标签: python amazon-web-services elasticsearch