From 7801ed0d6037771cd17268ab89972410a663fe46 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 25 Sep 2023 10:14:14 +0700 Subject: [PATCH] fix find_results through SearchProcess --- tubearchivist/home/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tubearchivist/home/views.py b/tubearchivist/home/views.py index 0b6c6a6..f5c771d 100644 --- a/tubearchivist/home/views.py +++ b/tubearchivist/home/views.py @@ -200,11 +200,12 @@ class ArchivistResultsView(ArchivistViewConfig): def find_results(self): """add results and pagination to context""" response, _ = ElasticWrap(self.es_search).get(self.data) + results = SearchProcess(response).process() max_hits = response["hits"]["total"]["value"] self.pagination_handler.validate(max_hits) self.context.update( { - "results": [i["_source"] for i in response["hits"]["hits"]], + "results": results, "max_hits": max_hits, "pagination": self.pagination_handler.pagination, "aggs": response.get("aggregations"),