Compare commits

..

3 Commits

Author SHA1 Message Date
17e61a151a satisfy linter 2026-07-15 23:47:38 +02:00
ab0b3ad7ab same thing with index ls 2026-07-15 23:38:55 +02:00
e423e448e7 use mapmap.Slicer to filter index templates 2026-07-15 23:20:25 +02:00
2 changed files with 6 additions and 0 deletions

View File

@@ -6,3 +6,4 @@
- add datastream support: - add datastream support:
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream 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,6 +62,11 @@ func filterIndices(conf *cfg.Config, list indices.Response) indices.Response {
} }
return mapmap.NewSlicer(list).MapSliceValuesImmutable(func(index types.IndicesRecord) bool { return mapmap.NewSlicer(list).MapSliceValuesImmutable(func(index types.IndicesRecord) bool {
if strings.HasPrefix(*index.Index, ".ds-") {
// ignore data stream backing indicies
return false
}
if !conf.Partials && strings.HasPrefix(*index.Index, "partial-") { if !conf.Partials && strings.HasPrefix(*index.Index, "partial-") {
return false return false
} }