How to upload data to elasticsearch?

Hello everyone,

I am trying to upload the data to elasticsearch using helpers.bulk

from elasticsearch import Elasticsearch, helpers
data = []
my_data = {"_index": ES_INDEX.format(strftime("%Y.%m.%d", gmtime())),
                                 "_type": type,
                                 "_source": res_json}
data.append (my_data)
helpers.bulk(es, adds_diag)

and I have the error:
BrokenPipeError: [Errno 32] Broken pipe

I am quite new to elasticsearch and could not figure out what is the problem.

Might you suggest me some possible causes for the issue?

Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.