diff --git a/app/signals/apps/search/documents/status_message.py b/app/signals/apps/search/documents/status_message.py index 2b54a3085..6fbfd79d3 100644 --- a/app/signals/apps/search/documents/status_message.py +++ b/app/signals/apps/search/documents/status_message.py @@ -2,6 +2,8 @@ # Copyright (C) 2023 Gemeente Amsterdam from elasticsearch_dsl import Boolean, Document, Integer, Keyword, Text +from signals.apps.search.settings import app_settings + class StatusMessage(Document): id = Integer() @@ -11,4 +13,4 @@ class StatusMessage(Document): active = Boolean() class Index: - name = 'status_messages' + name = app_settings.CONNECTION['STATUS_MESSAGE_INDEX'] diff --git a/app/signals/settings/base.py b/app/signals/settings/base.py index 61f4b80e4..b6ff82b1a 100644 --- a/app/signals/settings/base.py +++ b/app/signals/settings/base.py @@ -372,6 +372,7 @@ def is_super_user(user): 'CONNECTION': { 'HOST': os.getenv('ELASTICSEARCH_HOST', 'elastic-index.service.consul:9200'), 'INDEX': os.getenv('ELASTICSEARCH_INDEX', 'signals'), + 'STATUS_MESSAGE_INDEX': os.getenv('ELASTICSEARCH_STATUS_MESSAGE_INDEX', 'status_messages'), }, }