Skip to content

Commit

Permalink
Allows in the bulk method to indicate the index only in the signature
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosgalvez-tiendeo committed Mar 2, 2021
1 parent 3a5f7c5 commit c8aa31d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elasticmock/fake_elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def bulk(self, body, index=None, doc_type=None, params=None, headers=None):
action = next(iter(line.keys()))

version = 1
index = line[action]['_index']
index = line[action].get('_index') or index
doc_type = line[action].get('_type', "_doc") # _type is deprecated in 7.x

if action in ['delete', 'update'] and not line[action].get("_id"):
Expand Down

0 comments on commit c8aa31d

Please sign in to comment.