code: public void commit() {
          if (getBulk().numberOfActions() > 0) {
              BulkResponse response = getBulk().execute().actionGet();
              if (response.hasFailures()) {
                  for (BulkItemResponse itemResponse : response.getItems()) {
                      if (!itemResponse.isFailed()) {
                          continue;
                      }
  
                      if (itemResponse.getFailure().getStatus() == RestStatus.NOT_FOUND) {
                          logger.error(itemResponse.getFailureMessage());
                      } else {
                          throw new RuntimeException("ES sync commit error" + itemResponse.getFailureMessage());
                      }
                  }
              }
          }
      }
docs: 提交批次