func (s *FieldStatsService) IgnoreUnavailable(ignoreUnavailable bool) *FieldStatsService {
	s.ignoreUnavailable = &ignoreUnavailable
	return s
}
IgnoreUnavailable is documented as: Whether specified concrete indices should be ignored when unavailable (missing or closed).
package elastic
import (
	"fmt"
	"net/http"
	"net/url"
	"strings"
	"gopkg.in/olivere/elastic.v3/uritemplates"
)
const (
	FieldStatsClusterLevel = "cluster"
	FieldStatsIndicesLevel = "indices"
)
type FieldStatsService struct {
	client            *Client
	pretty            bool
	level             string
	index             []string
	allowNoIndices    *bool
	expandWildcards   string
	fields            []string
	ignoreUnavailable *bool
	bodyJson          interface{}
	bodyString        string
}
func NewFieldStatsService(client *Client) *FieldStatsService {
	return &FieldStatsService{
		client: client,
		index:  make([]string, 0),
		fields: make([]string, 0),
	}
}
func (s *FieldStatsService) Index(index ...string) *FieldStatsService {
	s.index = append(s.index, index...)
	return s
}
func (s *FieldStatsService) AllowNoIndices(allowNoIndices bool) *FieldStatsService {
	s.allowNoIndices = &allowNoIndices
	return s
}
func (s *FieldStatsService) ExpandWildcards(expandWildcards string) *FieldStatsService {
	s.expandWildcards = expandWildcards
	return s
}
func (s *FieldStatsService) Fields(fields ...string) *FieldStatsService {
	s.fields = append(s.fields, fields...)
	return s
}