Apply relevance sorting only when a user search query was entered
authorThierry Florac <tflorac@ulthar.net>
Fri, 17 Jul 2020 09:02:17 +0200
changeset 1406 a568b9d2f7dd
parent 1405 a123fc2a6f69
child 1407 85e615286c7a
Apply relevance sorting only when a user search query was entered
src/pyams_content/features/search/portlet/__init__.py
--- a/src/pyams_content/features/search/portlet/__init__.py	Thu Jul 16 17:39:51 2020 +0200
+++ b/src/pyams_content/features/search/portlet/__init__.py	Fri Jul 17 09:02:17 2020 +0200
@@ -42,9 +42,7 @@
     @staticmethod
     def has_user_query(request):
         params = request.params
-        return params.get('user_search', '').strip() or \
-            params.get('tag', '').strip() or \
-            params.get('collection', '').strip()
+        return params.get('user_search', '').strip()
 
     @staticmethod
     def _get_items(request=None, start=0, length=10, limit=None, ignore_cache=False):