From 0da31d2dd10c64e8a67a7f3671df5820804cebb9 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 14 Nov 2019 09:02:16 +0100 Subject: [PATCH] Add search_description to search index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The search_description field is path of wagtail core. "SEO-crafted description of the content, used for search indexing. This is also suitable for the page’s HTML tag." [1] Strangely it is not included in the search index by default. Add the search_description field to the search index. [1] http://docs.wagtail.io/en/v2.7/reference/pages/model_reference.html --- mpicms/base/mixins.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mpicms/base/mixins.py b/mpicms/base/mixins.py index 83c2914..df711d7 100644 --- a/mpicms/base/mixins.py +++ b/mpicms/base/mixins.py @@ -54,6 +54,7 @@ class BodyMixin(Page): search_fields = [ index.SearchField('body'), + index.SearchField("search_description"), ] api_fields = [