func (s *ScanService) Pretty(pretty bool) *ScanService {
	s.pretty = pretty
	return s
}
Pretty enables the caller to indent the JSON output.
package elastic
import (
	"errors"
	"fmt"
	"net/url"
	"strings"
	"gopkg.in/olivere/elastic.v3/uritemplates"
)
const (
	defaultKeepAlive = "5m"
)
var (
	EOS = errors.New("EOS")
	ErrNoScrollId = errors.New("no scrollId")
)
type ScanService struct {
	client       *Client
	indices      []string
	types        []string
	keepAlive    string
	searchSource *SearchSource
	pretty       bool
	routing      string
	preference   string
	size         *int
}
func NewScanService(client *Client) *ScanService {
	builder := &ScanService{
		client:       client,
		searchSource: NewSearchSource().Query(NewMatchAllQuery()),
	}
	return builder
}
func (s *ScanService) Index(indices ...string) *ScanService {
	if s.indices == nil {
		s.indices = make([]string, 0)
	}
	s.indices = append(s.indices, indices...)
	return s
}
func (s *ScanService) Type(types ...string) *ScanService {
	if s.types == nil {
		s.types = make([]string, 0)
	}
	s.types = append(s.types, types...)
	return s
}
func (s *ScanService) Scroll(keepAlive string) *ScanService {
	s.keepAlive = keepAlive
	return s
}
func (s *ScanService) KeepAlive(keepAlive string) *ScanService {
	s.keepAlive = keepAlive
	return s
}
func (s *ScanService) Fields(fields ...string) *ScanService {
	s.searchSource = s.searchSource.Fields(fields...)
	return s
}
func (s *ScanService) SearchSource(searchSource *SearchSource) *ScanService {
	s.searchSource = searchSource
	if s.searchSource == nil {
		s.searchSource = NewSearchSource().Query(NewMatchAllQuery())
	}
	return s
}
func (s *ScanService) Routing(routings ...string) *ScanService {
	s.routing = strings.Join(routings, ",")
	return s
}
func (s *ScanService) Preference(preference string) *ScanService {
	s.preference = preference
	return s
}
func (s *ScanService) Query(query Query) *ScanService {
	s.searchSource = s.searchSource.Query(query)
	return s
}
func (s *ScanService) PostFilter(postFilter Query) *ScanService {
	s.searchSource = s.searchSource.PostFilter(postFilter)
	return s
}
func (s *ScanService) FetchSource(fetchSource bool) *ScanService {
	s.searchSource = s.searchSource.FetchSource(fetchSource)
	return s
}
func (s *ScanService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *ScanService {
	s.searchSource = s.searchSource.FetchSourceContext(fetchSourceContext)
	return s
}
func (s *ScanService) Version(version bool) *ScanService {
	s.searchSource = s.searchSource.Version(version)
	return s
}
func (s *ScanService) Sort(field string, ascending bool) *ScanService {
	s.searchSource = s.searchSource.Sort(field, ascending)
	return s
}
func (s *ScanService) SortWithInfo(info SortInfo) *ScanService {
	s.searchSource = s.searchSource.SortWithInfo(info)
	return s
}
func (s *ScanService) SortBy(sorter ...Sorter) *ScanService {
	s.searchSource = s.searchSource.SortBy(sorter...)
	return s
}