diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-01-29 14:17:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-29 14:17:40 -0800 |
commit | 961c04cae992eadb42d286d2f85f8a675bdc68c8 (patch) | |
tree | 3408f2d06f847e966c53485e2d54c692cdd037c1 /vendor/gopkg.in/olivere/elastic.v5/indices_create.go | |
parent | 8d66523ba7d9a77129844be476732ebfd5272d64 (diff) | |
download | chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.tar.gz chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.tar.bz2 chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.zip |
Upgrading server dependancies (#8154)
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/indices_create.go')
-rw-r--r-- | vendor/gopkg.in/olivere/elastic.v5/indices_create.go | 18 |
1 files changed, 12 insertions, 6 deletions
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"` } |