private <T> T convert(Response response, Class<T> type) {
    try (InputStream is = response.getEntity().getContent()) {
      return mapper.readValue(is, type);
    } catch (IOException e) {
      final String message = String.format("Couldn't parse HTTP response %s into %s", response, type.getSimpleName());
      throw new UncheckedIOException(message, e);
    }
  }
Delete documents using query API
@see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html">Delete by query API</a>
criteria/elasticsearch/src/org/immutables/criteria/elasticsearch/ElasticsearchOps.java