code: func (r *SearchRequest) header() interface{} {
  	h := make(map[string]interface{})
  	if r.searchType != "" {
  		h["search_type"] = r.searchType
  	}
  
  	switch len(r.indices) {
  	case 0:
  	case 1:
  		h["index"] = r.indices[0]
  	default:
  		h["indices"] = r.indices
  	}
  
  	switch len(r.types) {
  	case 0:
  	case 1:
  		h["type"] = r.types[0]
  	default:
  		h["types"] = r.types
  	}
  
  	if r.routing != nil && *r.routing != "" {
  		h["routing"] = *r.routing
  	}
  	if r.preference != nil && *r.preference != "" {
  		h["preference"] = *r.preference
  	}
  	if r.requestCache != nil {
  		h["request_cache"] = *r.requestCache
  	}
  	if r.ignoreUnavailable != nil {
  		h["ignore_unavailable"] = *r.ignoreUnavailable
  	}
  	if r.allowNoIndices != nil {
  		h["allow_no_indices"] = *r.allowNoIndices
  	}
  	if r.expandWildcards != "" {
  		h["expand_wildcards"] = r.expandWildcards
  	}
  	if v := r.allowPartialSearchResults; v != nil {
  		h["allow_partial_search_results"] = *v
  	}
  	if r.scroll != "" {
  		h["scroll"] = r.scroll
  	}
  
  	return h
  }
docs: // header is used e.g. by MultiSearch to get information about the search header
  // of one SearchRequest.
  // See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-multi-search.html