From bc87524394a376b33d31ef0b398d082e0e9c08b4 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 3 Aug 2022 22:14:54 +0100 Subject: [PATCH] Stop saving queries These are only needed for prompted searches --- website/search/models.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/website/search/models.py b/website/search/models.py index 4a2bc43..94cd0bd 100644 --- a/website/search/models.py +++ b/website/search/models.py @@ -8,7 +8,6 @@ from django.views.decorators.http import require_GET from wagtail.contrib.routable_page.models import RoutablePageMixin, route from wagtail.models import Page from wagtail.query import PageQuerySet -from wagtail.search.models import Query from wagtail.search.utils import parse_query_string from website.common.models import BaseContentMixin, BasePage @@ -69,7 +68,6 @@ class SearchPage(BaseContentMixin, RoutablePageMixin, BasePage): # type: ignore } filters, query = parse_query_string(search_query) - Query.get(search_query).add_hit() pages = Page.objects.live().not_type(self.__class__, HomePage).search(query) paginator = Paginator(pages, self.PAGE_SIZE)