func (s *ReindexService) Script(script *Script) *ReindexService {
	s.script = script
	return s
}
Script allows for modification of the documents as they are reindexed
from source to destination.
package elastic
import (
	"fmt"
	"net/url"
)
type ReindexService struct {
	client            *Client
	pretty            bool
	consistency       string
	refresh           *bool
	timeout           string
	waitForCompletion *bool
	bodyJson          interface{}
	bodyString        string
	source            *ReindexSource
	destination       *ReindexDestination
	conflicts         string
	size              *int
	script            *Script
}
func NewReindexService(client *Client) *ReindexService {
	return &ReindexService{
		client: client,
	}
}
func (s *ReindexService) Consistency(consistency string) *ReindexService {
	s.consistency = consistency
	return s
}
func (s *ReindexService) Refresh(refresh bool) *ReindexService {
	s.refresh = &refresh
	return s
}
func (s *ReindexService) Timeout(timeout string) *ReindexService {
	s.timeout = timeout
	return s
}
func (s *ReindexService) WaitForCompletion(waitForCompletion bool) *ReindexService {
	s.waitForCompletion = &waitForCompletion
	return s
}
func (s *ReindexService) Pretty(pretty bool) *ReindexService {
	s.pretty = pretty
	return s
}
func (s *ReindexService) Source(source *ReindexSource) *ReindexService {
	s.source = source
	return s
}
func (s *ReindexService) SourceIndex(index string) *ReindexService {
	if s.source == nil {
		s.source = NewReindexSource()
	}
	s.source = s.source.Index(index)
	return s
}
func (s *ReindexService) Destination(destination *ReindexDestination) *ReindexService {
	s.destination = destination
	return s
}
func (s *ReindexService) DestinationIndex(index string) *ReindexService {
	if s.destination == nil {
		s.destination = NewReindexDestination()
	}
	s.destination = s.destination.Index(index)
	return s
}
func (s *ReindexService) DestinationIndexAndType(index, typ string) *ReindexService {
	if s.destination == nil {
		s.destination = NewReindexDestination()
	}
	s.destination = s.destination.Index(index)
	s.destination = s.destination.Type(typ)
	return s
}
func (s *ReindexService) Conflicts(conflicts string) *ReindexService {
	s.conflicts = conflicts
	return s
}
func (s *ReindexService) AbortOnVersionConflict() *ReindexService {
	s.conflicts = "abort"
	return s
}
func (s *ReindexService) ProceedOnVersionConflict() *ReindexService {
	s.conflicts = "proceed"
	return s
}
func (s *ReindexService) Size(size int) *ReindexService {
	s.size = &size
	return s
}