func (s *SuggestService) Do(ctx context.Context) (SuggestResult, error) {
	path, params, err := s.buildURL()
	if err != nil {
		return nil, err
	}
	body := make(map[string]interface{})
	for _, s := range s.suggesters {
		src, err := s.Source(false)
		if err != nil {
			return nil, err
		}
		body[s.Name()] = src
	}
	res, err := s.client.PerformRequest(ctx, "POST", path, params, body)
	if err != nil {
		return nil, err
	}
	var suggestions map[string]*json.RawMessage
	if err := s.client.decoder.Decode(res.Body, &suggestions); err != nil {
		return nil, err
	}
	ret := make(SuggestResult)
	for name, result := range suggestions {
		if name != "_shards" {
			var sug []Suggestion
			if err := s.client.decoder.Decode(*result, &sug); err != nil {
				return nil, err
			}
			ret[name] = sug
		}
	}
	return ret, nil
}
Do executes the request.
package elastic
import (
	"context"
	"encoding/json"
	"fmt"
	"net/url"
	"strings"
	"gopkg.in/olivere/elastic.v5/uritemplates"
)
type SuggestService struct {
	client     *Client
	pretty     bool
	routing    string
	preference string
	index      []string
	suggesters []Suggester
}
func NewSuggestService(client *Client) *SuggestService {
	builder := &SuggestService{
		client: client,
	}
	return builder
}
func (s *SuggestService) Index(index ...string) *SuggestService {
	s.index = append(s.index, index...)
	return s
}
func (s *SuggestService) Pretty(pretty bool) *SuggestService {
	s.pretty = pretty
	return s
}
func (s *SuggestService) Routing(routing string) *SuggestService {
	s.routing = routing
	return s
}
func (s *SuggestService) Preference(preference string) *SuggestService {
	s.preference = preference
	return s
}
func (s *SuggestService) Suggester(suggester Suggester) *SuggestService {
	s.suggesters = append(s.suggesters, suggester)
	return s
}
func (s *SuggestService) buildURL() (string, url.Values, error) {
	var err error
	var path string
	if len(s.index) > 0 {
		path, err = uritemplates.Expand("/{index}/_suggest", map[string]string{
			"index": strings.Join(s.index, ","),
		})
	} else {
		path = "/_suggest"
	}
	if err != nil {
		return "", url.Values{}, err
	}
	params := url.Values{}
	if s.pretty {
		params.Set("pretty", fmt.Sprintf("%v", s.pretty))
	}
	if s.routing != "" {
		params.Set("routing", s.routing)
	}
	if s.preference != "" {
		params.Set("preference", s.preference)
	}
	return path, params, nil
}