Skip to content

Commit

Permalink
Improve Search filter
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Mar 22, 2023
1 parent 8e4721d commit 50f3fb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion isimip_data/metadata/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def filter_queryset(self, request, queryset, view):
query = request.GET.get('query')
if query:
# first, split the search string whitespace into words
search_strings = query.split()
search_strings = query.replace('/', ' ').replace('_', ' ').replace('-', ' ').split()

# next, join the search_strings for the different search_words with an AND
search_string = ' & '.join(search_strings)
Expand Down

0 comments on commit 50f3fb5

Please sign in to comment.