From 6b5c88155591dc25cc93779a7a3cf445003a0f10 Mon Sep 17 00:00:00 2001 From: jdcaballerov Date: Mon, 14 Dec 2020 13:40:38 -0500 Subject: [PATCH] Fix search to include filters --- archivebox/core/mixins.py | 2 +- archivebox/search/__init__.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/archivebox/core/mixins.py b/archivebox/core/mixins.py index d1203745..538ca1e3 100644 --- a/archivebox/core/mixins.py +++ b/archivebox/core/mixins.py @@ -18,6 +18,6 @@ class SearchResultsAdminMixin(object): except Exception as err: messages.add_message(request, messages.WARNING, f'Error from the search backend, only showing results from default admin search fields - Error: {err}') else: - qs |= qsearch + qs = queryset & qsearch finally: return qs, use_distinct diff --git a/archivebox/search/__init__.py b/archivebox/search/__init__.py index a1f67ef7..b281d1a4 100644 --- a/archivebox/search/__init__.py +++ b/archivebox/search/__init__.py @@ -106,4 +106,5 @@ def index_links(links: Union[List[Link],None], out_dir: Path=OUTPUT_DIR): color='red', ) else: - write_search_index(link, texts, out_dir=out_dir) \ No newline at end of file + write_search_index(link, texts, out_dir=out_dir) + \ No newline at end of file