Skip to content

Commit

Permalink
Return empty result response if searchtext contains no tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Oct 8, 2024
1 parent 1972b58 commit d3ed4ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/search_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def __init__(self, tenant, logger):
def search(self, identity, searchtext, filter, limit):
search_permissions = self.search_permissions(identity)
(filterword, tokens) = self.tokenize(searchtext)
if not tokens:
return {'results': [], 'result_counts': []}
filter_ids = filter
if not filter:
# use all permitted facets if filter is empty
Expand Down

0 comments on commit d3ed4ba

Please sign in to comment.