Add more settings to example config

This commit is contained in:
2022-07-21 13:49:38 +01:00
parent 4df8afef1c
commit b9fda0d654
3 changed files with 6 additions and 9 deletions

View File

@@ -1,10 +1,6 @@
import pprint
from django.conf import settings
from opensearchpy import OpenSearch
pp = pprint.PrettyPrinter(indent=4)
def initialise_opensearch():
auth = (settings.OPENSEARCH_USERNAME, settings.OPENSEARCH_PASSWORD)
@@ -62,9 +58,8 @@ def construct_query(query, fields, size):
def filter_blacklisted(user, response):
pp.pprint(response["hits"]["hits"])
print("LEN", len(response["hits"]["hits"]))
response["redacted"] = 0
response["exemption"] = None
# For every hit from ES
for item in list(response["hits"]["hits"]):
# For every blacklisted type