func (s *FieldCapsService) Validate() error {
	return nil
}
Validate checks if the operation is valid.
package elastic
import (
	"context"
	"fmt"
	"net/http"
	"net/url"
	"strings"
	"github.com/olivere/elastic/uritemplates"
)
type FieldCapsService struct {
	client            *Client
	pretty            bool
	index             []string
	allowNoIndices    *bool
	expandWildcards   string
	fields            []string
	ignoreUnavailable *bool
	bodyJson          interface{}
	bodyString        string
}
func NewFieldCapsService(client *Client) *FieldCapsService {
	return &FieldCapsService{
		client: client,
	}
}
func (s *FieldCapsService) Index(index ...string) *FieldCapsService {
	s.index = append(s.index, index...)
	return s
}
func (s *FieldCapsService) AllowNoIndices(allowNoIndices bool) *FieldCapsService {
	s.allowNoIndices = &allowNoIndices
	return s
}
func (s *FieldCapsService) ExpandWildcards(expandWildcards string) *FieldCapsService {
	s.expandWildcards = expandWildcards
	return s
}
func (s *FieldCapsService) Fields(fields ...string) *FieldCapsService {
	s.fields = append(s.fields, fields...)
	return s
}
func (s *FieldCapsService) IgnoreUnavailable(ignoreUnavailable bool) *FieldCapsService {
	s.ignoreUnavailable = &ignoreUnavailable
	return s
}
func (s *FieldCapsService) Pretty(pretty bool) *FieldCapsService {
	s.pretty = pretty
	return s
}
func (s *FieldCapsService) BodyJson(body interface{}) *FieldCapsService {
	s.bodyJson = body
	return s
}
func (s *FieldCapsService) BodyString(body string) *FieldCapsService {
	s.bodyString = body
	return s
}
func (s *FieldCapsService) buildURL() (string, url.Values, error) {
	var err error
	var path string
	if len(s.index) > 0 {
		path, err = uritemplates.Expand("/{index}/_field_caps", map[string]string{
			"index": strings.Join(s.index, ","),
		})
	} else {
		path = "/_field_caps"
	}
	if err != nil {
		return "", url.Values{}, err
	}
	params := url.Values{}
	if s.pretty {
		params.Set("pretty", "true")
	}
	if s.allowNoIndices != nil {
		params.Set("allow_no_indices", fmt.Sprintf("%v", *s.allowNoIndices))
	}
	if s.expandWildcards != "" {
		params.Set("expand_wildcards", s.expandWildcards)
	}
	if len(s.fields) > 0 {
		params.Set("fields", strings.Join(s.fields, ","))
	}
	if s.ignoreUnavailable != nil {
		params.Set("ignore_unavailable", fmt.Sprintf("%v", *s.ignoreUnavailable))
	}
	return path, params, nil
}