code: func (b *UpdateService) url() (string, url.Values, error) {
  	// Build url
  	var path string
  	var err error
  	if b.typ == "_doc" {
  		path, err = uritemplates.Expand("/{index}/_update/{id}", map[string]string{
  			"index": b.index,
  			"id":    b.id,
  		})
  	} else {
  		path, err = uritemplates.Expand("/{index}/{type}/{id}/_update", map[string]string{
  			"index": b.index,
  			"type":  b.typ,
  			"id":    b.id,
  		})
  	}
  	if err != nil {
  		return "", url.Values{}, err
  	}
  
  	// Parameters
  	params := make(url.Values)
  	if b.pretty {
  		params.Set("pretty", "true")
  	}
  	if b.routing != "" {
  		params.Set("routing", b.routing)
  	}
  	if b.parent != "" {
  		params.Set("parent", b.parent)
  	}
  	if b.timeout != "" {
  		params.Set("timeout", b.timeout)
  	}
  	if b.refresh != "" {
  		params.Set("refresh", b.refresh)
  	}
  	if b.waitForActiveShards != "" {
  		params.Set("wait_for_active_shards", b.waitForActiveShards)
  	}
  	if len(b.fields) > 0 {
  		params.Set("fields", strings.Join(b.fields, ","))
  	}
  	if b.version != nil {
  		params.Set("version", fmt.Sprintf("%d", *b.version))
  	}
  	if b.versionType != "" {
  		params.Set("version_type", b.versionType)
  	}
  	if b.retryOnConflict != nil {
  		params.Set("retry_on_conflict", fmt.Sprintf("%v", *b.retryOnConflict))
  	}
  
  	return path, params, nil
  }
docs: // url returns the URL part of the document request.