Skip to content

Commit 3308890

Browse files
committed
List APIs to use ES for non empty search str only
1 parent 48ef86b commit 3308890

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

core/common/views.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -567,14 +567,7 @@ def is_head(self):
567567
return self.request.method.lower() == 'head'
568568

569569
def should_perform_es_search(self):
570-
if self.is_head():
571-
result = bool(self.get_search_string())
572-
else:
573-
result = SEARCH_PARAM in self.request.query_params
574-
575-
return result or self.has_searchable_extras_fields() or bool(
576-
self.get_faceted_filters()
577-
) or len(self.get_sort_attributes()) > 0
570+
return bool(self.get_search_string()) or self.has_searchable_extras_fields() or bool(self.get_faceted_filters())
578571

579572
def has_searchable_extras_fields(self):
580573
return bool(

0 commit comments

Comments
 (0)