Skip to content

Commit

Permalink
Merge pull request #1 from askoretskiy/patch-1
Browse files Browse the repository at this point in the history
Fixed doc_type check
  • Loading branch information
snakeye authored Aug 16, 2018
2 parents 23b9dfe + 3bcbc4a commit bcc113a
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 @@ -156,7 +156,7 @@ def search(self, index=None, doc_type=None, body=None, params=None):
matches = []
for searchable_index in searchable_indexes:
for document in self.__documents_dict[searchable_index]:
if doc_type is not None and document.get('_type') != doc_type:
if doc_type is not None and document.get('_type') not in doc_type: # value in a list of allowed doc_types
continue
matches.append(document)

Expand Down

0 comments on commit bcc113a

Please sign in to comment.