index-management icon indicating copy to clipboard operation
index-management copied to clipboard

[FEATURE] Enhance explain API with query function like filtering, sorting

Open bowenlan-amzn opened this issue 2 years ago • 2 comments

Add some query parameters to filter by certain fields in the explain API for managed indices Such as filtering for only failed managed indices or ones using specific policies or in specific states or on specific actions etc.

bowenlan-amzn avatar Jan 06 '23 18:01 bowenlan-amzn

Can I be assigned to this task? Thanks!

Joshua152 avatar Oct 01 '23 18:10 Joshua152

Current support:

  • Seach and sort by index name https://github.com/opensearch-project/index-management/blob/d42cc69f8202ea5c7732f6db6c2543a7376d0f30/src/main/resources/mappings/opendistro-ism-config.json#L650 Default search params are
  size: 20
  from: 0
  sortField: managed_index.index
  sortOrder: asc
  queryString: *

Requirements:

  • Filter by the policy applied https://github.com/opensearch-project/index-management/blob/d42cc69f8202ea5c7732f6db6c2543a7376d0f30/src/main/resources/mappings/opendistro-ism-config.json#L776
  • Filter by metadata.state https://github.com/opensearch-project/index-management/blob/d42cc69f8202ea5c7732f6db6c2543a7376d0f30/src/main/resources/mappings/opendistro-ism-config.json#L807
  • Filter by metadata.action https://github.com/opensearch-project/index-management/blob/d42cc69f8202ea5c7732f6db6c2543a7376d0f30/src/main/resources/mappings/opendistro-ism-config.json#L824
  • Filter by failed/not failed https://github.com/opensearch-project/index-management/blob/d42cc69f8202ea5c7732f6db6c2543a7376d0f30/src/main/resources/mappings/opendistro-ism-config.json#L824 https://github.com/opensearch-project/index-management/blob/d42cc69f8202ea5c7732f6db6c2543a7376d0f30/src/main/resources/mappings/opendistro-ism-config.json#L842 https://github.com/opensearch-project/index-management/blob/d42cc69f8202ea5c7732f6db6c2543a7376d0f30/src/main/resources/mappings/opendistro-ism-config.json#L900

bowenlan-amzn avatar Oct 18 '23 18:10 bowenlan-amzn