diff options
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/indices_put_alias.go')
-rw-r--r-- | vendor/gopkg.in/olivere/elastic.v5/indices_put_alias.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/indices_put_alias.go b/vendor/gopkg.in/olivere/elastic.v5/indices_put_alias.go index 5d965bd66..12f8e1bd5 100644 --- a/vendor/gopkg.in/olivere/elastic.v5/indices_put_alias.go +++ b/vendor/gopkg.in/olivere/elastic.v5/indices_put_alias.go @@ -192,7 +192,7 @@ func (a *AliasRemoveAction) Source() (interface{}, error) { // -- Service -- // AliasService enables users to add or remove an alias. -// See https://www.elastic.co/guide/en/elasticsearch/reference/5.2/indices-aliases.html +// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-aliases.html // for details. type AliasService struct { client *Client @@ -274,7 +274,12 @@ func (s *AliasService) Do(ctx context.Context) (*AliasResult, error) { body["actions"] = actions // Get response - res, err := s.client.PerformRequest(ctx, "POST", path, params, body) + res, err := s.client.PerformRequest(ctx, PerformRequestOptions{ + Method: "POST", + Path: path, + Params: params, + Body: body, + }) if err != nil { return nil, err } @@ -291,5 +296,7 @@ func (s *AliasService) Do(ctx context.Context) (*AliasResult, error) { // AliasResult is the outcome of calling Do on AliasService. type AliasResult struct { - Acknowledged bool `json:"acknowledged"` + Acknowledged bool `json:"acknowledged"` + ShardsAcknowledged bool `json:"shards_acknowledged"` + Index string `json:"index,omitempty"` } |