code: func (q *MatchQuery) Source() (interface{}, error) {
  	// {"match":{"name":{"query":"value","type":"boolean/phrase"}}}
  	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
  }
docs: // Source returns JSON for the function score query.