From dc56396012b6dfe96b3be1d1867a8f41dddae960 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Sat, 13 Jan 2024 18:32:30 +0100 Subject: [PATCH] Use elasticsearch only in production Signed-off-by: Emmy D'Anello --- tfjm/settings.py | 4 +--- tfjm/settings_prod.py | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tfjm/settings.py b/tfjm/settings.py index 12321e8..faea1b2 100644 --- a/tfjm/settings.py +++ b/tfjm/settings.py @@ -203,9 +203,7 @@ DJANGO_TABLES2_TEMPLATE = 'django_tables2/bootstrap5.html' HAYSTACK_CONNECTIONS = { 'default': { - 'ENGINE': 'haystack.backends.elasticsearch7_backend.Elasticsearch7SearchEngine', - 'URL': 'http://elasticsearch:9200/', - 'INDEX_NAME': 'haystack', + 'ENGINE': 'haystack.backends.simple_backend.SimpleEngine', } } diff --git a/tfjm/settings_prod.py b/tfjm/settings_prod.py index 455a685..f53ec92 100644 --- a/tfjm/settings_prod.py +++ b/tfjm/settings_prod.py @@ -39,3 +39,11 @@ CHANNEL_LAYERS = { }, }, } + +HAYSTACK_CONNECTIONS = { + 'default': { + 'ENGINE': 'haystack.backends.elasticsearch7_backend.Elasticsearch7SearchEngine', + 'URL': 'http://elasticsearch:9200/', + 'INDEX_NAME': 'haystack', + } +}