code: func SetMaxRetries(maxRetries int) ClientOptionFunc {
  	return func(c *Client) error {
  		if maxRetries < 0 {
  			return errors.New("MaxRetries must be greater than or equal to 0")
  		} else if maxRetries == 0 {
  			c.retrier = noRetries
  		} else {
  			// Create a Retrier that will wait for 100ms (+/- jitter) between requests.
  			// This resembles the old behavior with maxRetries.
  			ticks := make([]int, maxRetries)
  			for i := 0; i < len(ticks); i++ {
  				ticks[i] = 100
  			}
  			backoff := NewSimpleBackoff(ticks...)
  			c.retrier = NewBackoffRetrier(backoff)
  		}
  		return nil
  	}
  }
docs: // SetMaxRetries sets the maximum number of retries before giving up when
  // performing a HTTP request to Elasticsearch.
  //
  // Deprecated: Replace with a Retry implementation.