func (s *ExistsService) buildURL() (string, url.Values, error) {
	path, err := uritemplates.Expand("/{index}/{type}/{id}", map[string]string{
		"id":    s.id,
		"index": s.index,
		"type":  s.typ,
	})
	if err != nil {
		return "", url.Values{}, err
	}
	params := url.Values{}
	if v := s.pretty; v != nil {
		params.Set("pretty", fmt.Sprint(*v))
	}
	if v := s.human; v != nil {
		params.Set("human", fmt.Sprint(*v))
	}
	if v := s.errorTrace; v != nil {
		params.Set("error_trace", fmt.Sprint(*v))
	}
	if len(s.filterPath) > 0 {
		params.Set("filter_path", strings.Join(s.filterPath, ","))
	}
	if s.realtime != nil {
		params.Set("realtime", fmt.Sprint(*s.realtime))
	}
	if s.refresh != "" {
		params.Set("refresh", s.refresh)
	}
	if s.routing != "" {
		params.Set("routing", s.routing)
	}
	if s.parent != "" {
		params.Set("parent", s.parent)
	}
	if s.preference != "" {
		params.Set("preference", s.preference)
	}
	return path, params, nil
}
buildURL builds the URL for the operation.
package elastic
import (
	"context"
	"fmt"
	"net/http"
	"net/url"
	"strings"
	"github.com/olivere/elastic/v7/uritemplates"
)
type ExistsService struct {
	client *Client
	pretty     *bool        
	human      *bool        
	errorTrace *bool        
	filterPath []string     
	headers    http.Header  
	id         string
	index      string
	typ        string
	preference string
	realtime   *bool
	refresh    string
	routing    string
	parent     string
}
func NewExistsService(client *Client) *ExistsService {
	return &ExistsService{
		client: client,
		typ:    "_doc",
	}
}
func (s *ExistsService) Pretty(pretty bool) *ExistsService {
	s.pretty = &pretty
	return s
}
func (s *ExistsService) Human(human bool) *ExistsService {
	s.human = &human
	return s
}
func (s *ExistsService) ErrorTrace(errorTrace bool) *ExistsService {
	s.errorTrace = &errorTrace
	return s
}
func (s *ExistsService) FilterPath(filterPath ...string) *ExistsService {
	s.filterPath = filterPath
	return s
}
func (s *ExistsService) Header(name string, value string) *ExistsService {
	if s.headers == nil {
		s.headers = http.Header{}
	}
	s.headers.Add(name, value)
	return s
}
func (s *ExistsService) Headers(headers http.Header) *ExistsService {
	s.headers = headers
	return s
}
func (s *ExistsService) Id(id string) *ExistsService {
	s.id = id
	return s
}
func (s *ExistsService) Index(index string) *ExistsService {
	s.index = index
	return s
}
func (s *ExistsService) Type(typ string) *ExistsService {
	s.typ = typ
	return s
}
func (s *ExistsService) Preference(preference string) *ExistsService {
	s.preference = preference
	return s
}
func (s *ExistsService) Realtime(realtime bool) *ExistsService {
	s.realtime = &realtime
	return s
}
func (s *ExistsService) Refresh(refresh string) *ExistsService {
	s.refresh = refresh
	return s
}
func (s *ExistsService) Routing(routing string) *ExistsService {
	s.routing = routing
	return s
}
func (s *ExistsService) Parent(parent string) *ExistsService {
	s.parent = parent
	return s
}