Single<Boolean> exists() {
    final String uri = String.format(Locale.ROOT, "/%s/_mapping", index);
    final Request request = new Request("GET", uri);
    return transport.execute(request).map(x -> true).onErrorResumeNext(e -> Single.just(false));
  }
Elastic index operations to create, delete an index.
criteria/elasticsearch/src/org/immutables/criteria/elasticsearch/IndexOps.java