PrepareCount API has been deprecated from 2.1 . I was trying the alternate way of using prepareSearch with setSize as zero. But that didnt seem to work. It basically returned me no values at all.
SearchRequestBuilder srBuilder = client.prepareSearch();
srBuilder.setQuery(queryBuilder); ///added a termQuery
Am I doing anything wrong here?