Skip to content

Commit

Permalink
Add search_description to search index
Browse files Browse the repository at this point in the history
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
<meta name="description"> 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
  • Loading branch information
donald committed Nov 14, 2019
1 parent fc46f27 commit 0da31d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mpicms/base/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class BodyMixin(Page):

search_fields = [
index.SearchField('body'),
index.SearchField("search_description"),
]

api_fields = [
Expand Down

0 comments on commit 0da31d2

Please sign in to comment.