mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 12:34:19 +02:00
Compare commits
2 Commits
fix/lintma
...
hide-ds-in
| Author | SHA1 | Date | |
|---|---|---|---|
| 07adfcadec | |||
|
|
d69984b01f |
1
TODO.md
1
TODO.md
@@ -6,4 +6,3 @@
|
|||||||
- 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
|
|
||||||
|
|||||||
@@ -62,12 +62,6 @@ 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 {
|
||||||
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-") {
|
if !conf.Partials && strings.HasPrefix(*index.Index, "partial-") {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,9 +95,7 @@ func filterIndexTemplates(conf *cfg.Config, nameFilter string,
|
|||||||
|
|
||||||
if len(conf.Filter) > 0 {
|
if len(conf.Filter) > 0 {
|
||||||
if !mapmap.NewSlicer(tpl.IndexTemplate.IndexPatterns).
|
if !mapmap.NewSlicer(tpl.IndexTemplate.IndexPatterns).
|
||||||
FindSliceInSlice(conf.Filter, func(val, find string) bool {
|
FindSliceInSlice(conf.Filter, strings.Contains) {
|
||||||
return strings.Contains(val, find)
|
|
||||||
}) {
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user