Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1587 | correcting wildcard
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Aug 28, 2023
1 parent 2e29fba commit bb9abcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/common/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,14 +668,14 @@ def __get_search_results(self, ignore_retired_filter=False, sort=True, highlight
def get_mandatory_words_criteria(self):
criterion = None
for must_have in CustomESSearch.get_must_haves(self.get_raw_search_string()):
criteria, _ = self.get_wildcard_search_criterion(f"*{must_have}*")
criteria, _ = self.get_wildcard_search_criterion(f"{must_have}*")
criterion = criteria if criterion is None else criterion & criteria
return criterion

def get_mandatory_exclude_words_criteria(self):
criterion = None
for must_not_have in CustomESSearch.get_must_not_haves(self.get_raw_search_string()):
criteria, _ = self.get_wildcard_search_criterion(f"*{must_not_have}*")
criteria, _ = self.get_wildcard_search_criterion(f"{must_not_have}*")
criterion = criteria if criterion is None else criterion | criteria
return criterion

Expand Down

0 comments on commit bb9abcd

Please sign in to comment.