Hi,
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.setTypes(AUDIT_TYPE);
srBuilder.setSearchType(SearchType.QUERY_AND_FETCH);
srBuilder.setFetchSource(true);
srBuilder.setSize(0);
srBuilder.setQuery(queryBuilder); ///added a termQuery
Am I doing anything wrong here?