1
Fork 0

Use contentless FTS

This commit is contained in:
Jake Howard 2024-03-31 15:08:01 +01:00
parent eef673db2f
commit 0cefa8d125
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -20,7 +20,7 @@ class CoreConfig(AppConfig):
# Django doesn't like running DB queries during app initialization
warnings.filterwarnings("ignore", module="django.db", category=RuntimeWarning)
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)
self.loaded = True