add sort support to search, add index fields command, fix error messages (#25)

This commit is contained in:
T. von Dein
2026-06-01 12:30:41 +02:00
parent f1877c6903
commit 504db9835d
19 changed files with 233 additions and 63 deletions

View File

@@ -22,14 +22,14 @@ import (
"log/slog"
"codeberg.org/scip/esctl/pkg/cfg"
"codeberg.org/scip/esctl/pkg/printer"
"codeberg.org/scip/esctl/pkg/printer"
)
func NodeList(conf *cfg.Config) error {
// get nodes
nodes, err := conf.DefaultCluster.ES.Cat.Nodes().Do(context.Background())
if err != nil {
return fmt.Errorf("failed to get nodes: %s", err)
return fmt.Errorf("failed to get nodes: %s", esErrorString(err))
}
slog.Debug("ES result", "nodes", nodes)