Minor fixes for OpenSearch (#28)

Minor fixes for OpenSearch
This commit is contained in:
Jason 2021-12-20 16:16:58 +11:00 committed by GitHub
parent 561f9d840a
commit fd2122cf20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -433,9 +433,9 @@ class ImageProcessor():
def _index_strings(self):
"""Index the extracted strings."""
if self.config:
self.OpenSearch = OpenSearchDataStore(
host=self.config.ES_HOST, port=self.config.ES_PORT,
url=self.config.ES_URL)
self.opensearch = OpenSearchDataStore(
host=self.config.OS_HOST, port=self.config.OS_PORT,
url=self.config.OS_URL)
else:
self.opensearch = OpenSearchDataStore()
index_name = ''.join(('es', self.image_hash))

View file

@ -83,8 +83,8 @@ class IndexSearcher():
host=self.config.PG_HOST, port=self.config.PG_PORT,
db_name=self.config.PG_DB_NAME)
self.opensearch = OpenSearchDataStore(
host=self.config.ES_HOST, port=self.config.ES_PORT,
url=self.config.ES_URL)
host=self.config.OS_HOST, port=self.config.OS_PORT,
url=self.config.OS_URL)
else:
self.postgresql = PostgresqlDataStore()
self.opensearch = OpenSearchDataStore()