-
Notifications
You must be signed in to change notification settings - Fork 183
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
[FEATURE] Index State Management support #284
Comments
This is a good idea. Most of the plugins are unsupported via methods in the client, so developers end up writing raw curl requests and sending those like this (not in python):
There is a larger question of how to support plugins in clients. In OpenSearch, there is no such thing as an "ilmClient." I think one of the visions for OpenSearch is to be more extensible and flexible than its predecessor, which means it should be easy to add in this kind of functionality. And we should expect an increasing number of plugins/extensions. Where do you think this functionality should go for the python client? |
I should also mention that someone started this conversation about how to architect this here: #90 |
For those who are interested, I forked the ElasticSearch Python library to support the creation of ISM/ILM policies and it works: https://github.com/kinoute/elasticsearch-py/blob/7.11/elasticsearch/client/ilm.py#L111-130 def put_lifecycle(self, policy, body=None, params=None, headers=None):
"""
Creates a lifecycle policy
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.11/ilm-put-lifecycle.html>`_
:arg policy: The name of the index lifecycle policy
:arg body: The lifecycle policy definition to register
"""
if policy in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'policy'.")
return self.transport.perform_request(
"PUT",
_make_path("_plugins", "_ism", "policies", policy),
params=params,
headers=headers,
body=body,
) |
Feel free to contribute any code to this repo that you write or find, as long as its license is compatible (e.g., Apache 2.0). |
Closed via #398 |
Is your feature request related to a problem?
I would like to create/add index policy in the Index State Management but couldn't find a way to do it.
What solution would you like?
Support The index state management to create policies.
What alternatives have you considered?
I tried the official ElasticSearch which supports the feature through the use of a
ilmClient
instance and theput_lifecycle
method. But it doesn't work with OpenSearch because it tries to create policies in/_ilm/policy/abc
which doesn't exist in OpenSearch:The text was updated successfully, but these errors were encountered: