Replace OpenSearch with Elasticsearch

This commit is contained in:
2022-11-21 07:20:29 +00:00
parent 7702e04286
commit 61f93390d9
8 changed files with 28 additions and 28 deletions

View File

@@ -217,7 +217,7 @@ class StorageBackend(object):
# For every hit from ES
for index, item in enumerate(list(response["hits"]["hits"])):
# For every blacklisted type
for blacklisted_type in settings.OPENSEARCH_BLACKLISTED.keys():
for blacklisted_type in settings.ELASTICSEARCH_BLACKLISTED.keys():
# Check this field we are matching exists
if "_source" in item.keys():
data_index = "_source"
@@ -228,7 +228,7 @@ class StorageBackend(object):
if blacklisted_type in item[data_index].keys():
content = item[data_index][blacklisted_type]
# For every item in the blacklisted array for the type
for blacklisted_item in settings.OPENSEARCH_BLACKLISTED[
for blacklisted_item in settings.ELASTICSEARCH_BLACKLISTED[
blacklisted_type
]:
if blacklisted_item == str(content):