From 8eebbdc0f49c232060541028c523a408fc7bace0 Mon Sep 17 00:00:00 2001 From: Oscar Cortez Date: Mon, 11 May 2020 18:20:23 -0600 Subject: [PATCH] Add weight into wiki Article fields --- src/wiki/models/article.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wiki/models/article.py b/src/wiki/models/article.py index beee6ad9..bf319ac8 100644 --- a/src/wiki/models/article.py +++ b/src/wiki/models/article.py @@ -117,7 +117,8 @@ class Article(models.Model): ) ), ).filter(id=self.id).update( - search_vector=SearchVector('wiki_title', 'wiki_body') + search_vector=SearchVector('wiki_title', weight='A') + + SearchVector('wiki_body', weight='B') ) def get_children(self, max_num=None, user_can_read=None, **kwargs): -- 2.45.2