code: func (q *PrefixQuery) Source() (interface{}, error) {
  	source := make(map[string]interface{})
  	query := make(map[string]interface{})
  	source["prefix"] = query
  
  	if q.boost == nil && q.rewrite == "" && q.queryName == "" {
  		query[q.name] = q.prefix
  	} else {
  		subQuery := make(map[string]interface{})
  		subQuery["value"] = q.prefix
  		if q.boost != nil {
  			subQuery["boost"] = *q.boost
  		}
  		if q.rewrite != "" {
  			subQuery["rewrite"] = q.rewrite
  		}
  		if q.queryName != "" {
  			subQuery["_name"] = q.queryName
  		}
  		query[q.name] = subQuery
  	}
  
  	return source, nil
  }
docs: // Source returns JSON for the query.