You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
However, when I use a wildcard _opendistro/_ism/explain/* search to investigate all indices, I also get total_managed_indices in the response mixed up in the response object together with the indices.E.g.
This makes for harder and unexpected response parsing. I think the results of indices should be separated from metadata, e.g. under a subkey or such so that iteration over the results doesn't have to have exceptions for what sort of key it is (index entry vs metadata).
To Reproduce
Query _opendistro/_ism/explain/* in (AWS) ES 7.9
Expected behavior
Separation of result items from metadata.
Thanks for opening the issue, agree it's not helpful to have them mixed like this (and would cause an issue with an index named total_managed_indices most likely). Unfortunately we cannot change the structure of the API response at this point anymore since it would break the parsing for everyone using it. Ideally this should have been caught during CR so we could have perhaps populated an x-header instead of the response body. For now I would suggest to handle the total_managed_indices explicitly in your parsing logic and perhaps we can look into supporting a v2 version of the API with the suggested format and keep around the v1 for users still using it.
Describe the bug
Documentation at https://opendistro.github.io/for-elasticsearch-docs/docs/im/ism/api/#explain-index states that a response for the
explain
API endpoint looks like this:However, when I use a wildcard
_opendistro/_ism/explain/*
search to investigate all indices, I also gettotal_managed_indices
in the response mixed up in the response object together with the indices.E.g.This makes for harder and unexpected response parsing. I think the results of indices should be separated from metadata, e.g. under a subkey or such so that iteration over the results doesn't have to have exceptions for what sort of key it is (index entry vs metadata).
To Reproduce
Query
_opendistro/_ism/explain/*
in (AWS) ES 7.9Expected behavior
Separation of result items from metadata.
The text was updated successfully, but these errors were encountered: