我有近 10K 的 json 文档,我想通过使用来自 python 的 elasticsearch bulk api 将所有这些文档推送到 elasticsearch。我浏览了一些文档,但没有得到任何解决方案。
result=es.bulk(index="index1", doc_type="index123", body=jsonvalue)
helpers.bulk(es,doc)
我都试过了,但没有结果,我收到了这个错误
elasticsearch.exceptions.RequestError: TransportError(400, u'illegal_argument_exception', u'Malformed action/metadata line [1], expected START_OBJECT or END_OBJECT but found [VALUE_STRING]')
请帮我