diff options
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/indices_exists_template.go')
-rw-r--r-- | vendor/gopkg.in/olivere/elastic.v5/indices_exists_template.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/indices_exists_template.go b/vendor/gopkg.in/olivere/elastic.v5/indices_exists_template.go index 873d8c00c..40b06e895 100644 --- a/vendor/gopkg.in/olivere/elastic.v5/indices_exists_template.go +++ b/vendor/gopkg.in/olivere/elastic.v5/indices_exists_template.go @@ -10,7 +10,7 @@ import ( "net/http" "net/url" - "gopkg.in/olivere/elastic.v5/uritemplates" + "github.com/olivere/elastic/uritemplates" ) // IndicesExistsTemplateService checks if a given template exists. @@ -62,7 +62,7 @@ func (s *IndicesExistsTemplateService) 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.local != nil { params.Set("local", fmt.Sprintf("%v", *s.local)) @@ -96,7 +96,12 @@ func (s *IndicesExistsTemplateService) Do(ctx context.Context) (bool, error) { } // Get HTTP response - res, err := s.client.PerformRequest(ctx, "HEAD", path, params, nil, 404) + res, err := s.client.PerformRequest(ctx, PerformRequestOptions{ + Method: "HEAD", + Path: path, + Params: params, + IgnoreErrors: []int{404}, + }) if err != nil { return false, err } |