func (q *MatchQuery) Source() (interface{}, error) {
	source := make(map[string]interface{})
	match := make(map[string]interface{})
	source["match"] = match
	query := make(map[string]interface{})
	match[q.name] = query
	query["query"] = q.text
	if q.operator != "" {
		query["operator"] = q.operator
	}
	if q.analyzer != "" {
		query["analyzer"] = q.analyzer
	}
	if q.fuzziness != "" {
		query["fuzziness"] = q.fuzziness
	}
	if q.prefixLength != nil {
		query["prefix_length"] = *q.prefixLength
	}
	if q.maxExpansions != nil {
		query["max_expansions"] = *q.maxExpansions
	}
	if q.minimumShouldMatch != "" {
		query["minimum_should_match"] = q.minimumShouldMatch
	}
	if q.fuzzyRewrite != "" {
		query["fuzzy_rewrite"] = q.fuzzyRewrite
	}
	if q.lenient != nil {
		query["lenient"] = *q.lenient
	}
	if q.fuzzyTranspositions != nil {
		query["fuzzy_transpositions"] = *q.fuzzyTranspositions
	}
	if q.zeroTermsQuery != "" {
		query["zero_terms_query"] = q.zeroTermsQuery
	}
	if q.cutoffFrequency != nil {
		query["cutoff_frequency"] = q.cutoffFrequency
	}
	if q.boost != nil {
		query["boost"] = *q.boost
	}
	if q.queryName != "" {
		query["_name"] = q.queryName
	}
	return source, nil
}
Source returns JSON for the function score query.
package elastic
type MatchQuery struct {
	name                string
	text                interface{}
	operator            string  
	analyzer            string
	boost               *float64
	fuzziness           string
	prefixLength        *int
	maxExpansions       *int
	minimumShouldMatch  string
	fuzzyRewrite        string
	lenient             *bool
	fuzzyTranspositions *bool
	zeroTermsQuery      string
	cutoffFrequency     *float64
	queryName           string
}
func NewMatchQuery(name string, text interface{}) *MatchQuery {
	return &MatchQuery{name: name, text: text}
}
func (q *MatchQuery) Operator(operator string) *MatchQuery {
	q.operator = operator
	return q
}
func (q *MatchQuery) Analyzer(analyzer string) *MatchQuery {
	q.analyzer = analyzer
	return q
}
func (q *MatchQuery) Fuzziness(fuzziness string) *MatchQuery {
	q.fuzziness = fuzziness
	return q
}
func (q *MatchQuery) PrefixLength(prefixLength int) *MatchQuery {
	q.prefixLength = &prefixLength
	return q
}
func (q *MatchQuery) MaxExpansions(maxExpansions int) *MatchQuery {
	q.maxExpansions = &maxExpansions
	return q
}
func (q *MatchQuery) CutoffFrequency(cutoff float64) *MatchQuery {
	q.cutoffFrequency = &cutoff
	return q
}
func (q *MatchQuery) MinimumShouldMatch(minimumShouldMatch string) *MatchQuery {
	q.minimumShouldMatch = minimumShouldMatch
	return q
}
func (q *MatchQuery) FuzzyRewrite(fuzzyRewrite string) *MatchQuery {
	q.fuzzyRewrite = fuzzyRewrite
	return q
}
func (q *MatchQuery) FuzzyTranspositions(fuzzyTranspositions bool) *MatchQuery {
	q.fuzzyTranspositions = &fuzzyTranspositions
	return q
}
func (q *MatchQuery) Lenient(lenient bool) *MatchQuery {
	q.lenient = &lenient
	return q
}
func (q *MatchQuery) ZeroTermsQuery(zeroTermsQuery string) *MatchQuery {
	q.zeroTermsQuery = zeroTermsQuery
	return q
}
func (q *MatchQuery) Boost(boost float64) *MatchQuery {
	q.boost = &boost
	return q
}
func (q *MatchQuery) QueryName(queryName string) *MatchQuery {
	q.queryName = queryName
	return q
}