code: public void refresh(String index) throws IOException {
          logger.debug("refresh index [{}]", index);
          RefreshRequest request = new RefreshRequest();
          if (!isNullOrEmpty(index)) {
              request.indices(index);
          }
          RefreshResponse refresh = client.indices().refresh(request, RequestOptions.DEFAULT);
          logger.trace("refresh response: {}", refresh);
      }
docs: Refresh an index
  @param index index name
  @throws IOException In case of error