summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/olivere/elastic.v5/ingest_simulate_pipeline.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/ingest_simulate_pipeline.go')
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/ingest_simulate_pipeline.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/ingest_simulate_pipeline.go b/vendor/gopkg.in/olivere/elastic.v5/ingest_simulate_pipeline.go
index 04015b459..213f97bbb 100644
--- a/vendor/gopkg.in/olivere/elastic.v5/ingest_simulate_pipeline.go
+++ b/vendor/gopkg.in/olivere/elastic.v5/ingest_simulate_pipeline.go
@@ -10,14 +10,14 @@ import (
"fmt"
"net/url"
- "gopkg.in/olivere/elastic.v5/uritemplates"
+ "github.com/olivere/elastic/uritemplates"
)
// IngestSimulatePipelineService executes a specific pipeline against the set of
// documents provided in the body of the request.
//
// The API is documented at
-// https://www.elastic.co/guide/en/elasticsearch/reference/5.2/simulate-pipeline-api.html.
+// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/simulate-pipeline-api.html.
type IngestSimulatePipelineService struct {
client *Client
pretty bool
@@ -85,7 +85,7 @@ func (s *IngestSimulatePipelineService) 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.verbose != nil {
params.Set("verbose", fmt.Sprintf("%v", *s.verbose))
@@ -127,7 +127,12 @@ func (s *IngestSimulatePipelineService) Do(ctx context.Context) (*IngestSimulate
}
// Get HTTP response
- res, err := s.client.PerformRequest(ctx, "POST", path, params, body)
+ res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
+ Method: "POST",
+ Path: path,
+ Params: params,
+ Body: body,
+ })
if err != nil {
return nil, err
}