summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/olivere/elastic.v5/cluster_state.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/cluster_state.go')
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/cluster_state.go20
1 files changed, 12 insertions, 8 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/cluster_state.go b/vendor/gopkg.in/olivere/elastic.v5/cluster_state.go
index d6e608211..54e9aa428 100644
--- a/vendor/gopkg.in/olivere/elastic.v5/cluster_state.go
+++ b/vendor/gopkg.in/olivere/elastic.v5/cluster_state.go
@@ -10,12 +10,12 @@ import (
"net/url"
"strings"
- "gopkg.in/olivere/elastic.v5/uritemplates"
+ "github.com/olivere/elastic/uritemplates"
)
// ClusterStateService allows to get a comprehensive state information of the whole cluster.
//
-// See https://www.elastic.co/guide/en/elasticsearch/reference/5.2/cluster-state.html
+// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/cluster-state.html
// for details.
type ClusterStateService struct {
client *Client
@@ -123,7 +123,7 @@ func (s *ClusterStateService) buildURL() (string, url.Values, error) {
// Add query string parameters
params := url.Values{}
if s.pretty {
- params.Set("pretty", "1")
+ params.Set("pretty", "true")
}
if s.allowNoIndices != nil {
params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
@@ -165,7 +165,11 @@ func (s *ClusterStateService) Do(ctx context.Context) (*ClusterStateResponse, er
}
// Get HTTP response
- res, err := s.client.PerformRequest(ctx, "GET", path, params, nil)
+ res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
+ Method: "GET",
+ Path: path,
+ Params: params,
+ })
if err != nil {
return nil, err
}
@@ -235,10 +239,10 @@ type clusterStateRoutingNode struct {
}
type indexTemplateMetaData struct {
- Template string `json:"template"` // e.g. "store-*"
- Order int `json:"order"`
- Settings map[string]interface{} `json:"settings"` // index settings
- Mappings map[string]interface{} `json:"mappings"` // type name -> mapping
+ IndexPatterns []string `json:"index_patterns"` // e.g. ["store-*"]
+ Order int `json:"order"`
+ Settings map[string]interface{} `json:"settings"` // index settings
+ Mappings map[string]interface{} `json:"mappings"` // type name -> mapping
}
type indexMetaData struct {