|
|
|
@ -38,3 +38,33 @@ func (o *opensearch) IndicesRefresh(ctx context.Context) error {
|
|
|
|
|
reply := 0
|
|
|
|
|
return xClient.Call(ctx, "IndicesRefresh", 0, &reply)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Refresh @Title 刷新
|
|
|
|
|
func (o *opensearch) Refresh(ctx context.Context) error {
|
|
|
|
|
xClient, err := client.GetClient(o)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
reply := 0
|
|
|
|
|
return xClient.Call(ctx, "Refresh", 0, &reply)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ReplyOpensearchRefreshProgress struct {
|
|
|
|
|
Completed bool `json:"completed"`
|
|
|
|
|
Total int `json:"total"`
|
|
|
|
|
Updated int `json:"updated"`
|
|
|
|
|
StartTimeInMillis int64 `json:"startTimeInMillis"`
|
|
|
|
|
RunningTimeInNanos int64 `json:"runningTimeInNanos"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// RefreshProgress @Title 刷新进度
|
|
|
|
|
func (o *opensearch) RefreshProgress(ctx context.Context) (reply ReplyOpensearchRefreshProgress, err error) {
|
|
|
|
|
xClient, err := client.GetClient(o)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if err = xClient.Call(ctx, "RefreshProgress", 0, &reply); err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|