code: func (q *HasChildQuery) Source() (interface{}, error) {
  	// {
  	//   "has_child" : {
  	//       "type" : "blog_tag",
  	//       "score_mode" : "min",
  	//       "query" : {
  	//           "term" : {
  	//               "tag" : "something"
  	//           }
  	//       }
  	//   }
  	// }
  	source := make(map[string]interface{})
  	query := make(map[string]interface{})
  	source["has_child"] = query
  
  	src, err := q.query.Source()
  	if err != nil {
  		return nil, err
  	}
  	query["query"] = src
  	query["type"] = q.childType
  	if q.boost != nil {
  		query["boost"] = *q.boost
  	}
  	if q.scoreMode != "" {
  		query["score_mode"] = q.scoreMode
  	}
  	if q.minChildren != nil {
  		query["min_children"] = *q.minChildren
  	}
  	if q.maxChildren != nil {
  		query["max_children"] = *q.maxChildren
  	}
  	if q.shortCircuitCutoff != nil {
  		query["short_circuit_cutoff"] = *q.shortCircuitCutoff
  	}
  	if q.queryName != "" {
  		query["_name"] = q.queryName
  	}
  	if q.innerHit != nil {
  		src, err := q.innerHit.Source()
  		if err != nil {
  			return nil, err
  		}
  		query["inner_hits"] = src
  	}
  	return source, nil
  }
docs: // Source returns JSON for the function score query.