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

@@ -41,7 +41,7 @@ func checkClusterIsLeader(conf *cfg.Config, leader string) bool {
Header("accept", "application/json").
Do(context.Background())
if err != nil {
fmt.Printf("failed to get ccr stats from %s: %s", leader, err)
fmt.Printf("failed to get ccr stats from %s: %s", leader, esErrorString(err))
return false
}
@@ -68,7 +68,7 @@ func checkClusterStatus(conf *cfg.Config, leader, follower string) bool {
Header("accept", "application/json").
Do(context.Background())
if err != nil {
fmt.Printf("failed to get health from %s: %s", cluster, err)
fmt.Printf("failed to get health from %s: %s", cluster, esErrorString(err))
return false
}
@@ -128,7 +128,7 @@ func findIlmErrors(conf *cfg.Config, leader, follower string) bool {
Header("accept", "application/json").
Do(context.Background())
if err != nil {
fmt.Printf("failed to get ilm status from %s: %s", cluster, err)
fmt.Printf("failed to get ilm status from %s: %s", cluster, esErrorString(err))
return false
}