code: public static void flush(HttpCall.Factory factory, String index) throws IOException {
      Request flushRequest =
          new Request.Builder()
              .url(
                  factory.baseUrl.newBuilder().addPathSegment(index).addPathSegment("_flush").build())
              .post(RequestBody.create(APPLICATION_JSON, ""))
              .tag("flush-index")
              .build();
  
      factory.newCall(flushRequest, BodyConverters.NULL).execute();
    }
docs: This is a blocking call, only used in tests.