strip ending y for better results on Search Vectors

This commit is contained in:
Markos Gogoulos 2020-12-25 15:22:24 +02:00
parent 6ee83432bc
commit d2bf457def
2 changed files with 2 additions and 2 deletions

View file

@ -120,7 +120,7 @@ class SearchRSSFeed(Feed):
# same as on files.views.MediaSearch: move this processing to a prepare_query function # same as on files.views.MediaSearch: move this processing to a prepare_query function
query = helpers.clean_query(query) query = helpers.clean_query(query)
q_parts = [ q_parts = [
q_part.strip("y") q_part.rstrip("y")
for q_part in query.split() for q_part in query.split()
if q_part not in STOP_WORDS if q_part not in STOP_WORDS
] ]

View file

@ -735,7 +735,7 @@ class MediaSearch(APIView):
# move this processing to a prepare_query function # move this processing to a prepare_query function
query = clean_query(query) query = clean_query(query)
q_parts = [ q_parts = [
q_part.strip("y") q_part.rstrip("y")
for q_part in query.split() for q_part in query.split()
if q_part not in STOP_WORDS if q_part not in STOP_WORDS
] ]