code: public void waitForHealthyIndex(String index) throws IOException {
          logger.debug("wait for yellow health on index [{}]", index);
  
          Response restResponse = lowLevelClient.performRequest("GET", "/_cluster/health/" + index,
                  Collections.singletonMap("wait_for_status", "yellow"));
          logger.trace("health response: {}", asMap(restResponse));
      }
docs: Wait for an index to become at least yellow (all primaries assigned)
  @param index index name
  @throws IOException In case of error