code: func (q *HasParentQuery) Source() (interface{}, error) {
  	// {
  	//   "has_parent" : {
  	//       "parent_type" : "blog",
  	//       "query" : {
  	//           "term" : {
  	//               "tag" : "something"
  	//           }
  	//       }
  	//   }
  	// }
  	source := make(map[string]interface{})
  	query := make(map[string]interface{})
  	source["has_parent"] = query
  
  	src, err := q.query.Source()
  	if err != nil {
  		return nil, err
  	}
  	query["query"] = src
  	query["parent_type"] = q.parentType
  	if q.boost != nil {
  		query["boost"] = *q.boost
  	}
  	if q.score != nil {
  		query["score"] = *q.score
  	}
  	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
  	}
  	if q.ignoreUnmapped != nil {
  		query["ignore_unmapped"] = *q.ignoreUnmapped
  	}
  	return source, nil
  }
docs: // Source returns JSON for the function score query.