diff --git a/arches/app/search/components/paging_filter.py b/arches/app/search/components/paging_filter.py index 677d32835c9..6433eaa7fda 100644 --- a/arches/app/search/components/paging_filter.py +++ b/arches/app/search/components/paging_filter.py @@ -34,7 +34,7 @@ def append_dsl(self, search_results_object, permitted_nodegroups, include_provis search_results_object['query'].limit = limit def post_search_hook(self, search_results_object, results, permitted_nodegroups): - total = results['hits']['total'] + total = results['hits']['total'] if results['hits']['total'] <= settings.SEARCH_RESULT_LIMIT else settings.SEARCH_RESULT_LIMIT page = 1 if self.request.GET.get(details['componentname']) == '' else int(self.request.GET.get(details['componentname'], 1)) paginator, pages = get_paginator(self.request, results, total, page, settings.SEARCH_ITEMS_PER_PAGE) diff --git a/arches/settings.py b/arches/settings.py index be7d9fb2d62..2d6399fd80e 100644 --- a/arches/settings.py +++ b/arches/settings.py @@ -467,6 +467,7 @@ SEARCH_DROPDOWN_LENGTH = 100 SEARCH_TERM_SENSITIVITY = 3 # a lower number will give more "Fuzzy" matches, recomend between 0-4, see "prefix_length" at https://www.elastic.co/guide/en/elasticsearch/reference/6.7/query-dsl-fuzzy-query.html#_parameters_7 WORDS_PER_SEARCH_TERM = 10 # set to None for unlimited number of words allowed for search terms +SEARCH_RESULT_LIMIT = 10000 # should be less than or equal to elasticsearch configuration, index.max_result_window (default = 10,000) ETL_USERNAME = 'ETL' # override this setting in your packages settings.py file