Use contentless FTS
This commit is contained in:
parent
eef673db2f
commit
0cefa8d125
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ class CoreConfig(AppConfig):
|
||||||
# Django doesn't like running DB queries during app initialization
|
# Django doesn't like running DB queries during app initialization
|
||||||
warnings.filterwarnings("ignore", module="django.db", category=RuntimeWarning)
|
warnings.filterwarnings("ignore", module="django.db", category=RuntimeWarning)
|
||||||
with connection.cursor() as cursor:
|
with connection.cursor() as cursor:
|
||||||
cursor.execute("CREATE VIRTUAL TABLE search_index USING fts5(body);")
|
cursor.execute("CREATE VIRTUAL TABLE search_index USING fts5(body, content='');")
|
||||||
|
|
||||||
post_save.connect(self.post_save, sender=Page)
|
post_save.connect(self.post_save, sender=Page)
|
||||||
self.loaded = True
|
self.loaded = True
|
||||||
|
|
Loading…
Reference in a new issue