瀏覽代碼

strip ending y for better results on Search Vectors

Markos Gogoulos 4 年之前
父節點
當前提交
d2bf457def
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      files/feeds.py
  2. 1 1
      files/views.py

+ 1 - 1
files/feeds.py

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

+ 1 - 1
files/views.py

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