code: func (r *SearchRequest) sourceAsMap() (interface{}, error) {
  	if r.source == nil {
  		// Default: No custom source specified
  		return r.searchSource.Source()
  	}
  	switch t := r.source.(type) {
  	default:
  		body, err := json.Marshal(r.source)
  		if err != nil {
  			return "", err
  		}
  		return RawStringQuery(body), nil
  	case *SearchSource:
  		return t.Source()
  	case json.RawMessage:
  		return RawStringQuery(string(t)), nil
  	case *json.RawMessage:
  		return RawStringQuery(string(*t)), nil
  	case string:
  		return RawStringQuery(t), nil
  	case *string:
  		if t != nil {
  			return RawStringQuery(*t), nil
  		}
  		return RawStringQuery("{}"), nil
  	}
  }
docs: // source returns the search source. It is used by Reindex.