summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/olivere/elastic.v5/explain.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/explain.go')
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/explain.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/explain.go b/vendor/gopkg.in/olivere/elastic.v5/explain.go
index bdfa00f1d..2b975ad5d 100644
--- a/vendor/gopkg.in/olivere/elastic.v5/explain.go
+++ b/vendor/gopkg.in/olivere/elastic.v5/explain.go
@@ -10,12 +10,12 @@ import (
"net/url"
"strings"
- "gopkg.in/olivere/elastic.v5/uritemplates"
+ "github.com/olivere/elastic/uritemplates"
)
// ExplainService computes a score explanation for a query and
// a specific document.
-// See https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-explain.html.
+// See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-explain.html.
type ExplainService struct {
client *Client
pretty bool
@@ -208,7 +208,7 @@ func (s *ExplainService) 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.xSource) > 0 {
params.Set("_source", strings.Join(s.xSource, ","))
@@ -298,7 +298,12 @@ func (s *ExplainService) Do(ctx context.Context) (*ExplainResponse, error) {
}
// Get HTTP response
- res, err := s.client.PerformRequest(ctx, "GET", path, params, body)
+ res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
+ Method: "GET",
+ Path: path,
+ Params: params,
+ Body: body,
+ })
if err != nil {
return nil, err
}