mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 11:24:17 +02:00
Additions and enhancements (#14)
- add interactive API repl - enhance cluster status output (use -v) - add more ccr commands - refactoring
This commit is contained in:
@@ -202,3 +202,17 @@ func IndexDelete(conf *cfg.Config, index string) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func IndexClose(conf *cfg.Config, index string) error {
|
||||
create := conf.DefaultCluster.ES.Indices.Close(index).
|
||||
Header("content-type", "application/json").
|
||||
Header("accept", "application/json")
|
||||
|
||||
_, err := create.Do(context.Background())
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to close index: %s", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user