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

[BUG] Cannot update aliased index through Index.save() #822

Closed
tienne-B opened this issue Sep 18, 2024 · 0 comments · Fixed by #823
Closed

[BUG] Cannot update aliased index through Index.save() #822

tienne-B opened this issue Sep 18, 2024 · 0 comments · Fixed by #823
Labels
bug Something isn't working untriaged Need triage

Comments

@tienne-B
Copy link
Contributor

What is the bug?

I am unable to update the mapping of an index which is accessed by opensearch-py through an alias.

The relevant frame from the stack-trace is:

  File "/usr/local/lib/python3.10/site-packages/opensearchpy/helpers/index.py", line 328, in save
    current_settings = self.get_settings(using=using)[self._name]["settings"][
KeyError: 'alias_name'

How can one reproduce the bug?

  1. Create an index and alias pointing to the index
  2. Create a Document (with any field) using the alias's name as the Index.name attribute
  3. Run .get_index().save() on the created Document subclass

What is the expected behavior?

I expect the underlying index to be updated through the alias, as is possible through direct requests.

What is your host/environment?

Using opensearch-py 2.4.2 with CPython 3.10.

Do you have any additional context?

I am willing to create a PR.

@tienne-B tienne-B added bug Something isn't working untriaged Need triage labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged Need triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant