Skip to content

Commit

Permalink
feature: add or_query to es utils
Browse files Browse the repository at this point in the history
  • Loading branch information
ClemDoum committed Dec 5, 2024
1 parent 6e3cd46 commit 4158f65
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions icij-common/icij_common/es/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ def and_query(*queries: Dict) -> Dict:
return bool_query({MUST: list(queries)})


def or_query(*queries: Dict) -> Dict:
return bool_query({SHOULD: list(queries)})


def must(*queries: Dict) -> Dict:
return {MUST: list(queries)}

Expand Down

0 comments on commit 4158f65

Please sign in to comment.