ok: true has been removed from es responses
This commit is contained in:
@@ -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})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user