aparo / pyes

Python connector for ElasticSearch - the pythonic way to use ElasticSearch
BSD 3-Clause "New" or "Revised" License
606 stars 269 forks source link

raise_on_bulk_item_failure not working with ES 1.0 #371

Closed g-clef closed 10 years ago

g-clef commented 10 years ago

From http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/_return_values.html , "ok" has been removed from all response values for ES 1.0. is_bulk_item_okay() is still checking for "ok" in the response. So, if raise_on_bulk_item_failure is set to true, pyes bulk inserts/deletes/etc are reporting as failed even if they are succeeding.

Modified is_bulk_item_okay to check for both new and old response types.