docs: public EsResponse search(String name, String type, EsRequest query) throws IOException {
          CloseableHttpClient client = HttpClients.createDefault();
          HttpPost method = new HttpPost(String.format("http://%s:%d/%s/%s/_search", host, port, name, type));
          try {
              StringEntity requestEntity = new StringEntity(query.toString(), ContentType.APPLICATION_JSON);
              method.setEntity(requestEntity);
  
              CloseableHttpResponse resp = client.execute(method);
              int status = resp.getStatusLine().getStatusCode();
              if (status != HttpStatus.SC_OK) {
                  throw new IOException(resp.getStatusLine().getReasonPhrase());
              }
              return EsResponse.read(resp.getEntity().getContent());
          } finally {
              method.releaseConnection();
          }
      }