summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/olivere/elastic.v5/indices_stats.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/indices_stats.go')
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/indices_stats.go39
1 files changed, 19 insertions, 20 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/indices_stats.go b/vendor/gopkg.in/olivere/elastic.v5/indices_stats.go
index 90ae6837a..20d35a6d4 100644
--- a/vendor/gopkg.in/olivere/elastic.v5/indices_stats.go
+++ b/vendor/gopkg.in/olivere/elastic.v5/indices_stats.go
@@ -10,11 +10,11 @@ import (
"net/url"
"strings"
- "gopkg.in/olivere/elastic.v5/uritemplates"
+ "github.com/olivere/elastic/uritemplates"
)
// IndicesStatsService provides stats on various metrics of one or more
-// indices. See https://www.elastic.co/guide/en/elasticsearch/reference/5.2/indices-stats.html.
+// indices. See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-stats.html.
type IndicesStatsService struct {
client *Client
pretty bool
@@ -135,7 +135,7 @@ func (s *IndicesStatsService) buildURL() (string, url.Values, error) {
// Add query string parameters
params := url.Values{}
if s.pretty {
- params.Set("pretty", "1")
+ params.Set("pretty", "true")
}
if len(s.groups) > 0 {
params.Set("groups", strings.Join(s.groups, ","))
@@ -180,7 +180,11 @@ func (s *IndicesStatsService) Do(ctx context.Context) (*IndicesStatsResponse, 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
}
@@ -239,25 +243,20 @@ type IndexStatsDocs struct {
}
type IndexStatsStore struct {
- Size string `json:"size,omitempty"` // human size, e.g. 119.3mb
- SizeInBytes int64 `json:"size_in_bytes,omitempty"`
- ThrottleTime string `json:"throttle_time,omitempty"` // human time, e.g. 0s
- ThrottleTimeInMillis int64 `json:"throttle_time_in_millis,omitempty"`
+ Size string `json:"size,omitempty"` // human size, e.g. 119.3mb
+ SizeInBytes int64 `json:"size_in_bytes,omitempty"`
}
type IndexStatsIndexing struct {
- IndexTotal int64 `json:"index_total,omitempty"`
- IndexTime string `json:"index_time,omitempty"`
- IndexTimeInMillis int64 `json:"index_time_in_millis,omitempty"`
- IndexCurrent int64 `json:"index_current,omitempty"`
- DeleteTotal int64 `json:"delete_total,omitempty"`
- DeleteTime string `json:"delete_time,omitempty"`
- DeleteTimeInMillis int64 `json:"delete_time_in_millis,omitempty"`
- DeleteCurrent int64 `json:"delete_current,omitempty"`
- NoopUpdateTotal int64 `json:"noop_update_total,omitempty"`
- IsThrottled bool `json:"is_throttled,omitempty"`
- ThrottleTime string `json:"throttle_time,omitempty"`
- ThrottleTimeInMillis int64 `json:"throttle_time_in_millis,omitempty"`
+ IndexTotal int64 `json:"index_total,omitempty"`
+ IndexTime string `json:"index_time,omitempty"`
+ IndexTimeInMillis int64 `json:"index_time_in_millis,omitempty"`
+ IndexCurrent int64 `json:"index_current,omitempty"`
+ DeleteTotal int64 `json:"delete_total,omitempty"`
+ DeleteTime string `json:"delete_time,omitempty"`
+ DeleteTimeInMillis int64 `json:"delete_time_in_millis,omitempty"`
+ DeleteCurrent int64 `json:"delete_current,omitempty"`
+ NoopUpdateTotal int64 `json:"noop_update_total,omitempty"`
}
type IndexStatsGet struct {