Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

further remove use of postional arguments with elasticsearch #291

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions msc_pygeoapi/connector/elasticsearch_.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ def create(self, index_name, mapping, overwrite=False):
LOGGER.info('{} index already exists.')
return False

elif self.Elasticsearch.indices.exists(index_name) and overwrite:
self.Elasticsearch.indices.delete(index_name)
elif self.Elasticsearch.indices.exists(index=index_name) and overwrite:
self.Elasticsearch.indices.delete(index=index_name)
LOGGER.info(f'Deleted existing {index_name} index.')

self.Elasticsearch.indices.create(
Expand Down Expand Up @@ -172,7 +172,7 @@ def delete(self, indexes):
raise ValueError(msg)

LOGGER.info(f'Deleting indexes {indexes}')
self.Elasticsearch.indices.delete(indexes)
self.Elasticsearch.indices.delete(index=indexes)

return True

Expand Down Expand Up @@ -217,7 +217,7 @@ def create_alias(self, alias, index, overwrite=False):
:return: `bool` of index alias creation status
"""

if not self.Elasticsearch.indices.exists_alias(alias):
if not self.Elasticsearch.indices.exists_alias(name=alias):
self.Elasticsearch.indices.put_alias(index=index, name=alias)
elif overwrite:
self.Elasticsearch.indices.update_aliases(
Expand Down