summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/olivere/elastic.v5/ingest_put_pipeline.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/ingest_put_pipeline.go')
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/ingest_put_pipeline.go17
1 files changed, 5 insertions, 12 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/ingest_put_pipeline.go b/vendor/gopkg.in/olivere/elastic.v5/ingest_put_pipeline.go
index 5781e7072..315453e9d 100644
--- a/vendor/gopkg.in/olivere/elastic.v5/ingest_put_pipeline.go
+++ b/vendor/gopkg.in/olivere/elastic.v5/ingest_put_pipeline.go
@@ -10,13 +10,13 @@ import (
"fmt"
"net/url"
- "github.com/olivere/elastic/uritemplates"
+ "gopkg.in/olivere/elastic.v5/uritemplates"
)
// IngestPutPipelineService adds pipelines and updates existing pipelines in
// the cluster.
//
-// It is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.0/put-pipeline-api.html.
+// It is documented at https://www.elastic.co/guide/en/elasticsearch/reference/5.2/put-pipeline-api.html.
type IngestPutPipelineService struct {
client *Client
pretty bool
@@ -84,7 +84,7 @@ func (s *IngestPutPipelineService) buildURL() (string, url.Values, error) {
// Add query string parameters
params := url.Values{}
if s.pretty {
- params.Set("pretty", "true")
+ params.Set("pretty", "1")
}
if s.masterTimeout != "" {
params.Set("master_timeout", s.masterTimeout)
@@ -132,12 +132,7 @@ func (s *IngestPutPipelineService) Do(ctx context.Context) (*IngestPutPipelineRe
}
// Get HTTP response
- res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
- Method: "PUT",
- Path: path,
- Params: params,
- Body: body,
- })
+ res, err := s.client.PerformRequest(ctx, "PUT", path, params, body)
if err != nil {
return nil, err
}
@@ -152,7 +147,5 @@ func (s *IngestPutPipelineService) Do(ctx context.Context) (*IngestPutPipelineRe
// IngestPutPipelineResponse is the response of IngestPutPipelineService.Do.
type IngestPutPipelineResponse struct {
- Acknowledged bool `json:"acknowledged"`
- ShardsAcknowledged bool `json:"shards_acknowledged"`
- Index string `json:"index,omitempty"`
+ Acknowledged bool `json:"acknowledged"`
}