483484485486487488489490491492493
if (type != null) { crb.setTypes(type); } return crb.execute().actionGet().getCount(); } @Override public Long getCount(String appid, String type, Map<String, ?> terms) { if (StringUtils.isBlank(appid) || terms == null || terms.isEmpty()) {
512513514515516517518519520521522
if (type != null) { crb.setTypes(type); } return crb.execute().actionGet().getCount(); } /** * Extracts the routing value from the appid. * The appid might contain a routing prefix like:
189190191192193194195196197198199
// Log LOGGER.debug( "Will count Entities: {}", request ); // Execute CountResponse count = request.execute().actionGet(); return count.getCount(); } private static AndFilterBuilder baseFilters( Class<?> resultType )
482483484485486487488489490491492
511512513514515516517518519520521
466467468469470471472473474475476
494495496497498499500501502503504
if (type != null) { crb.setTypes(type); } return crb.execute().actionGet().getCount(); } ////////////////////////////////////////////////////////////// @Override
209210211212213214215216217218219
final String type = typeMapping.getTypeAlias(); CountRequestBuilder builder = client.prepareCount(indexName).setTypes(type).setQuery(_query); return builder.execute(); } } private static final class MultiGet implements Esi4JOperation<ListenableActionFuture<MultiGetResponse>> {
467468469470471472473474475476477
495496497498499500501502503504505