func (s ScoreSort) Order(ascending bool) ScoreSort {
	s.ascending = ascending
	return s
}
Order defines whether sorting ascending (default) or descending.
package elastic
import "errors"
type Sorter interface {
	Source() (interface{}, error)
}
type SortInfo struct {
	Sorter
	Field          string
	Ascending      bool
	Missing        interface{}
	IgnoreUnmapped *bool
	SortMode       string
	NestedFilter   Query
	NestedPath     string
}
func (info SortInfo) Source() (interface{}, error) {
	prop := make(map[string]interface{})
	if info.Ascending {
		prop["order"] = "asc"
	} else {
		prop["order"] = "desc"
	}
	if info.Missing != nil {
		prop["missing"] = info.Missing
	}
	if info.IgnoreUnmapped != nil {
		prop["ignore_unmapped"] = *info.IgnoreUnmapped
	}
	if info.SortMode != "" {
		prop["mode"] = info.SortMode
	}
	if info.NestedFilter != nil {
		src, err := info.NestedFilter.Source()
		if err != nil {
			return nil, err
		}
		prop["nested_filter"] = src
	}
	if info.NestedPath != "" {
		prop["nested_path"] = info.NestedPath
	}
	source := make(map[string]interface{})
	source[info.Field] = prop
	return source, nil
}
type ScoreSort struct {
	Sorter
	ascending bool
}
func NewScoreSort() ScoreSort {
	return ScoreSort{ascending: false}  
}