code: private void indexWithRetry(final IndexRequest request, final String operationDescription) {
  
          try {
              new RetryUtil<IndexResponse>().retryOnException(() -> {
                  try {
                      return elasticSearchClient.index(request);
                  } catch (IOException e) {
                      throw new RuntimeException(e);
                  }
              }, null, null, RETRY_COUNT, operationDescription, "indexWithRetry");
          } catch (Exception e) {
              Monitors.error(className, "index");
              logger.error("Failed to index {} for request type: {}", request.id(), request.type(), e);
          }
      }
docs: Performs an index operation with a retry.
  @param request The index request that we want to perform.
  @param operationDescription The type of operation that we are performing.