Skip to content

Commit

Permalink
Minor fixes for OpenSearch (#28)
Browse files Browse the repository at this point in the history
Minor fixes for OpenSearch
  • Loading branch information
dfjxs authored Dec 20, 2021
1 parent 561f9d8 commit fd2122c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions dfdewey/utils/image_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,9 @@ def _index_record(self, index_name, string_record):
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))
Expand Down
4 changes: 2 additions & 2 deletions dfdewey/utils/index_searcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def __init__(self, case, image_id, image, config_file=None):
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()
Expand Down

0 comments on commit fd2122c

Please sign in to comment.