ok: true has been removed from es responses

This commit is contained in:
Honza Král
2014-01-08 20:38:35 +01:00
parent bc976f1bb6
commit 0701693cba
+1 -1
View File
@@ -108,7 +108,7 @@ def streaming_bulk(client, actions, chunk_size=500, raise_on_error=False, expand
# go through request-reponse pairs and detect failures
for op_type, item in map(methodcaller('popitem'), resp['items']):
ok = item.get('ok')
ok = 200 <= item.get('status', 500) < 300
if not ok and raise_on_error:
errors.append({op_type: item})