0

I wish to use the Bulk-API option with ElasticSearch-py. I try to use the bulk-api with this example:

from elasticsearch import Elasticsearch
es = Elasticsearch()
doc ={.....}
result = es.bulk(index="my_index", doc_type="my_doc_type", body=doc)

My index and my doc type is good but, I've got this error:

WARNING:elasticsearch:POST /my_index/my_doc_type/_bulk [status:500 request:0.002s]

Why i've got this error ? Thanks in advance.

Update

after some debugging, I manage to display this error:

{"error":"ActionRequestValidationException[Validation Failed: 1: no requests added;]","status":500}

pi-2r
  • 1,259
  • 4
  • 27
  • 52
  • HTTP status 500 is Internal Server Error, are there any errors in the Elasticsearch logs? – Dan Tuffery Oct 30 '14 at 16:58
  • I found this answer: http://stackoverflow.com/questions/20288770/how-to-use-bulk-api-to-store-the-keywords-in-es-by-using-python/23118497#23118497 I'll try this option. – pi-2r Oct 31 '14 at 16:55
  • I added this answer that uses python generators here: http://stackoverflow.com/a/39069077/235415 You should be able to process GBs of data with this. – Ethan Aug 21 '16 at 21:41

0 Answers0