Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1583 | Expansion text paramter and referenc…
Browse files Browse the repository at this point in the history
…e expression to use exact match search only
  • Loading branch information
snyaggarwal committed Jul 13, 2023
1 parent b6ba56f commit 3362d88
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/collections/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from core.common.constants import (
ACCESS_TYPE_VIEW, ACCESS_TYPE_EDIT,
ES_REQUEST_TIMEOUT, ES_REQUEST_TIMEOUT_ASYNC, HEAD, ALL, EXCLUDE_WILDCARD_SEARCH_PARAM, EXCLUDE_FUZZY_SEARCH_PARAM,
SEARCH_MAP_CODES_PARAM)
SEARCH_MAP_CODES_PARAM, INCLUDE_SEARCH_META_PARAM)
from core.common.models import ConceptContainerModel, BaseResourceModel
from core.common.search import CustomESSearch
from core.common.tasks import seed_children_to_expansion, batch_index_resources, index_expansion_concepts, \
Expand Down Expand Up @@ -721,7 +721,8 @@ def apply_filters(self, queryset, resource_klass):
search = document.search()
for filter_def in self.filter: # pylint: disable=not-an-iterable
if to_snake_case(filter_def['property']) == 'exact_match' or filter_def['property'] in [
EXCLUDE_WILDCARD_SEARCH_PARAM, EXCLUDE_FUZZY_SEARCH_PARAM, SEARCH_MAP_CODES_PARAM
EXCLUDE_WILDCARD_SEARCH_PARAM, EXCLUDE_FUZZY_SEARCH_PARAM, SEARCH_MAP_CODES_PARAM,
INCLUDE_SEARCH_META_PARAM
]:
continue
val = filter_def['value']
Expand Down

0 comments on commit 3362d88

Please sign in to comment.