diff --git a/SciPost_v1/settings/base.py b/SciPost_v1/settings/base.py index 70d622cb4954383f85fdbc07915b83ad3770e5c8..8ca8486fa749b7b1f673b1345520d0c95a3abd33 100644 --- a/SciPost_v1/settings/base.py +++ b/SciPost_v1/settings/base.py @@ -104,11 +104,18 @@ HAYSTACK_CONNECTIONS = { 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', 'PATH': 'local_files/haystack/', }, - 'base_search': { - 'ENGINE': 'haystack.backends.simple_backend.SimpleEngine', - } + # SimpleEngine doesn't need indexing, and could be useful for debugging, however + # does not fully support all haystack features + # 'base_search': { + # 'ENGINE': 'haystack.backends.simple_backend.SimpleEngine', + # } } +# Brute force automatically re-index Haystack using post_save signals on all models. +# When write-traffic increases, a custom processor is preferred which only connects +# signals to eg. `vet-accepted` signals possibly using cron jobs instead of realtime updates. +HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor' + SPHINXDOC_BASE_TEMPLATE = 'scipost/base.html' SPHINXDOC_PROTECTED_PROJECTS = {