我在AWS Lambda上也用同样的方法将数据推送到ElasticSearch:print("Pushing data to ES <: esindex esmapping>", helpers.bulk(g.esClient, dataGenerator()))
这里是回应
^{pr2}$
表示1条记录成功推送到Elasticsearch。在失败的情况下,我得到了如下的错误日志,Lambda函数失败了。(我已经从Json数据中删除了[]数组括号。)RequestError(400, 'action_request_validation_exception', 'Validation Failed: 1: index is missing;2: type is missing;3: index is missing;4: type is missing;5: index is missing;6: type is missing;7: index is missing;8: type is missing;9: index is missing;10: type is missing;11: index is missing;12: type is missing;13: index is missing;14: type is missing;15: index is missing;16: type is missing;17: index is missing;18: type is missing;19: index is missing;20: type is missing;21: index is missing;22: type is missing;23: index is missing;24: type is missing;25: index is missing;26: type is missing;27: index is missing;28: type is missing;29: index is missing;30: type is missing;'): RequestError