I am working on migration from Transport client to rest client:
To start with the simple change:
earlier in transport client to find a "type" exists ,we did this:
boolean typexists = this.client.admin().indices().prepareTypesExists("recovery_index").setTypes("recovery_type").get(TimeValue.timeValueSeconds(this.timeoutSecs)).isExists();
how do we achieve this using restClient? In rest Client we can get this as response:
Response response=restClient.performRequest("GET", "/recovery_index/recovery_type/_search", Collections.singletonMap("pretty", "true"));
now further from this response any quicker way to get if type exists??