Skip to content

Commit

Permalink
Merge pull request #47 from cuent/patch-1
Browse files Browse the repository at this point in the history
Add must to query type
  • Loading branch information
vrcmarcos authored Dec 3, 2020
2 parents 15cd0c6 + affbc4c commit e2e47f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions elasticmock/fake_elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class QueryType:
MATCH = 'MATCH'
TERM = 'TERM'
TERMS = 'TERMS'
MUST = 'MUST'

@staticmethod
def get_query_type(type_str):
Expand All @@ -38,6 +39,8 @@ def get_query_type(type_str):
return QueryType.TERM
elif type_str == 'terms':
return QueryType.TERMS
elif type_str == 'must':
return QueryType.MUST
else:
raise NotImplementedError(f'type {type_str} is not implemented for QueryType')

Expand Down

0 comments on commit e2e47f9

Please sign in to comment.