code: func (s *IndicesAnalyzeService) buildURL() (string, url.Values, error) {
  	// Build URL
  	var err error
  	var path string
  
  	if s.index == "" {
  		path = "/_analyze"
  	} else {
  		path, err = uritemplates.Expand("/{index}/_analyze", map[string]string{
  			"index": s.index,
  		})
  	}
  	if err != nil {
  		return "", url.Values{}, err
  	}
  
  	// Add query string parameters
  	params := url.Values{}
  	if s.pretty {
  		params.Set("pretty", "true")
  	}
  	if s.format != "" {
  		params.Set("format", s.format)
  	}
  	if s.preferLocal != nil {
  		params.Set("prefer_local", fmt.Sprintf("%v", *s.preferLocal))
  	}
  
  	return path, params, nil
  }
docs: // buildURL builds the URL for the operation.