summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/olivere/elastic.v5/indices_create.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-04-16 05:37:14 -0700
committerJoram Wilander <jwawilander@gmail.com>2018-04-16 08:37:14 -0400
commit6e2cb00008cbf09e556b00f87603797fcaa47e09 (patch)
tree3c0eb55ff4226a3f024aad373140d1fb860a6404 /vendor/gopkg.in/olivere/elastic.v5/indices_create.go
parentbf24f51c4e1cc6286885460672f7f449e8c6f5ef (diff)
downloadchat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.gz
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.bz2
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.zip
Depenancy upgrades and movign to dep. (#8630)
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/indices_create.go')
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/indices_create.go18
1 files changed, 6 insertions, 12 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/indices_create.go b/vendor/gopkg.in/olivere/elastic.v5/indices_create.go
index 8d8e0c25e..dfd17ac09 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"
- "github.com/olivere/elastic/uritemplates"
+ "gopkg.in/olivere/elastic.v5/uritemplates"
)
// IndicesCreateService creates a new index.
//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-create-index.html
+// See https://www.elastic.co/guide/en/elasticsearch/reference/5.2/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", "true")
+ params.Set("pretty", "1")
}
if b.masterTimeout != "" {
params.Set("master_timeout", b.masterTimeout)
@@ -109,12 +109,7 @@ func (b *IndicesCreateService) Do(ctx context.Context) (*IndicesCreateResult, er
}
// Get response
- res, err := b.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "PUT",
- Path: path,
- Params: params,
- Body: body,
- })
+ res, err := b.client.PerformRequest(ctx, "PUT", path, params, body)
if err != nil {
return nil, err
}
@@ -130,7 +125,6 @@ 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"`
- Index string `json:"index,omitempty"`
+ Acknowledged bool `json:"acknowledged"`
+ ShardsAcknowledged bool `json:"shards_acknowledged"`
}