code: func (q *NestedQuery) Source() (interface{}, error) {
  	query := make(map[string]interface{})
  	nq := make(map[string]interface{})
  	query["nested"] = nq
  
  	src, err := q.query.Source()
  	if err != nil {
  		return nil, err
  	}
  	nq["query"] = src
  
  	nq["path"] = q.path
  
  	if q.scoreMode != "" {
  		nq["score_mode"] = q.scoreMode
  	}
  	if q.boost != nil {
  		nq["boost"] = *q.boost
  	}
  	if q.queryName != "" {
  		nq["_name"] = q.queryName
  	}
  	if q.ignoreUnmapped != nil {
  		nq["ignore_unmapped"] = *q.ignoreUnmapped
  	}
  	if q.innerHit != nil {
  		src, err := q.innerHit.Source()
  		if err != nil {
  			return nil, err
  		}
  		nq["inner_hits"] = src
  	}
  	return query, nil
  }
docs: // Source returns JSON for the query.