func (f *TermsFacet) Sort(sort string) *TermsFacet {
	f.sort = sort
	return f
}
Sort sets the sort param
package solr
type Faceter interface {
	BuildFacet() M
	Name() string
}
type TermsFacet struct {
	name string
	field  string
	offset int
	limit  int
	sort   string
	minCount int
	facet M
	domain M
}
var _ Faceter = (*TermsFacet)(nil)
func NewTermsFacet(name string) *TermsFacet {
	return &TermsFacet{name: name, facet: M{}, domain: M{}}
}
func (f *TermsFacet) BuildFacet() M {
	m := M{"type": "terms"}
	if f.field != "" {
		m["field"] = f.field
	}
	if f.offset > 0 {
		m["offset"] = f.offset
	}
	if f.limit > 0 {
		m["limit"] = f.limit
	}
	if f.sort != "" {
		m["sort"] = f.sort
	}
	if f.minCount > 0 {
		m["mincount"] = f.minCount
	}
	if len(f.facet) > 0 {
		m["facet"] = f.facet
	}
	if len(f.domain) > 0 {
		m["domain"] = f.domain
	}
	return m
}
func (f *TermsFacet) Field(field string) *TermsFacet {
	f.field = field
	return f
}
func (f *TermsFacet) Offset(offset int) *TermsFacet {
	f.offset = offset
	return f
}
func (f *TermsFacet) Limit(limit int) *TermsFacet {
	f.limit = limit
	return f
}