Add CCR stuff, fix search, add docs support, support index maps, refactor (#13)

This commit is contained in:
T. von Dein
2026-05-12 18:28:57 +02:00
parent 327bc84bd8
commit dd619ab815
19 changed files with 717 additions and 237 deletions

View File

@@ -139,3 +139,22 @@ func ClusterSettingsSet(conf *cfg.Config, args cli.Args) error {
return nil
}
func ClusterSettingsSetSingle(conf *cfg.Config, setting, value string) error {
message, err := json.Marshal(value)
if err != nil {
return fmt.Errorf("failed to marshall persistent value <%v> to valid JSON: %s", value, err)
}
_, err = conf.Clusters[conf.CurrentCluster].ES.Cluster.PutSettings().
AddPersistent(setting, message).
Header("content-type", "application/json").
Header("accept", "application/json").
Do(context.Background())
if err != nil {
return fmt.Errorf("failed to set %s: %s", setting, err)
}
return nil
}