Compare commits

...

2 Commits

Author SHA1 Message Date
07adfcadec hide ds backend indices as any other hidden indices 2026-07-16 21:36:42 +02:00
T. von Dein
d69984b01f satisfy linter (#98) 2026-07-15 23:57:02 +02:00
3 changed files with 1 additions and 10 deletions

View File

@@ -6,4 +6,3 @@
- add datastream support:
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream
also exclude data stream backing indices from index ls

View File

@@ -62,12 +62,6 @@ func filterIndices(conf *cfg.Config, list indices.Response) indices.Response {
}
return mapmap.NewSlicer(list).MapSliceValuesImmutable(func(index types.IndicesRecord) bool {
fmt.Println(*index.Index)
if strings.HasPrefix(*index.Index, ".ds-") {
// ignore data stream backing indicies
return false
}
if !conf.Partials && strings.HasPrefix(*index.Index, "partial-") {
return false
}

View File

@@ -95,9 +95,7 @@ func filterIndexTemplates(conf *cfg.Config, nameFilter string,
if len(conf.Filter) > 0 {
if !mapmap.NewSlicer(tpl.IndexTemplate.IndexPatterns).
FindSliceInSlice(conf.Filter, func(val, find string) bool {
return strings.Contains(val, find)
}) {
FindSliceInSlice(conf.Filter, strings.Contains) {
return false
}
}