From 961c04cae992eadb42d286d2f85f8a675bdc68c8 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 29 Jan 2018 14:17:40 -0800 Subject: Upgrading server dependancies (#8154) --- vendor/gopkg.in/olivere/elastic.v5/indices_create.go | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'vendor/gopkg.in/olivere/elastic.v5/indices_create.go') diff --git a/vendor/gopkg.in/olivere/elastic.v5/indices_create.go b/vendor/gopkg.in/olivere/elastic.v5/indices_create.go index dfd17ac09..8d8e0c25e 100644 --- a/vendor/gopkg.in/olivere/elastic.v5/indices_create.go +++ b/vendor/gopkg.in/olivere/elastic.v5/indices_create.go @@ -9,12 +9,12 @@ import ( "errors" "net/url" - "gopkg.in/olivere/elastic.v5/uritemplates" + "github.com/olivere/elastic/uritemplates" ) // IndicesCreateService creates a new index. // -// See https://www.elastic.co/guide/en/elasticsearch/reference/5.2/indices-create-index.html +// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-create-index.html // for details. type IndicesCreateService struct { client *Client @@ -91,7 +91,7 @@ func (b *IndicesCreateService) Do(ctx context.Context) (*IndicesCreateResult, er params := make(url.Values) if b.pretty { - params.Set("pretty", "1") + params.Set("pretty", "true") } if b.masterTimeout != "" { params.Set("master_timeout", b.masterTimeout) @@ -109,7 +109,12 @@ func (b *IndicesCreateService) Do(ctx context.Context) (*IndicesCreateResult, er } // Get response - res, err := b.client.PerformRequest(ctx, "PUT", path, params, body) + res, err := b.client.PerformRequest(ctx, PerformRequestOptions{ + Method: "PUT", + Path: path, + Params: params, + Body: body, + }) if err != nil { return nil, err } @@ -125,6 +130,7 @@ func (b *IndicesCreateService) Do(ctx context.Context) (*IndicesCreateResult, er // IndicesCreateResult is the outcome of creating a new index. type IndicesCreateResult struct { - Acknowledged bool `json:"acknowledged"` - ShardsAcknowledged bool `json:"shards_acknowledged"` + Acknowledged bool `json:"acknowledged"` + ShardsAcknowledged bool `json:"shards_acknowledged"` + Index string `json:"index,omitempty"` } -- cgit v1.2.3-1-g7c22