public long countIndexShard(String index, String shardId, QueryBuilder query) { return count(index, null, shardId, query); }
numDocs = client.count(index, readResource.type(), Integer.toString(shardId), query); } else { numDocs = client.countIndexShard(index, Integer.toString(shardId), query);
public long count(String index, String type, QueryBuilder query) { return count(index, type, null, query); }
public long count(String index, QueryBuilder query) { return count(index, null, null, query); }
settings.setProperty(ES_RESOURCE_READ, "index1,index2,index3/type1"); for (int i = 0; i < 15; i++) { Mockito.when(client.count("index1", "type1", Integer.toString(i), MATCH_ALL)).thenReturn(1000L); Mockito.when(client.count("index2", "type1", Integer.toString(i), MATCH_ALL)).thenReturn(10000L); Mockito.when(client.count("index3", "type1", Integer.toString(i), MATCH_ALL)).thenReturn(100000L); Mockito.when(client.count("index1", "type1", Integer.toString(i), MATCH_ALL)).thenReturn(0L); Mockito.when(client.count("index2", "type1", Integer.toString(i), MATCH_ALL)).thenReturn(0L); Mockito.when(client.count("index3", "type1", Integer.toString(i), MATCH_ALL)).thenReturn(0L);
RestClient client = new RestClient(testSettings, mock); long count = client.count(index, type, MatchAllQueryBuilder.MATCH_ALL);
RestClient client = new RestClient(testSettings, mock); long count = client.count(index, type, MatchAllQueryBuilder.MATCH_ALL);
long count = client.count(index, MatchAllQueryBuilder.MATCH_ALL);
public long count(String indexAndType, QueryBuilder query) { return count(indexAndType, null, query); }
public long count(String indexAndType, QueryBuilder query) { return count(indexAndType, null, query); }
public long count(String indexAndType, QueryBuilder query) { return count(indexAndType, null, query); }
public long count(boolean read) { Resource res = (read ? resourceR : resourceW); return client.count(res.indexAndType(), QueryUtils.parseQuery(settings)); }
long numDocs = client.count(indexAndType.toString(), Integer.toString(shardId), query); int numPartitions = (int) Math.max(1, numDocs / maxDocsPerPartition); for (int i = 0; i < numPartitions; i++) {
long numDocs = client.count(indexAndType.toString(), Integer.toString(shardId), query); int numPartitions = (int) Math.max(1, numDocs / maxDocsPerPartition); for (int i = 0; i < numPartitions; i++) {
long numDocs = client.count(indexAndType.toString(), Integer.toString(shardId), query); int numPartitions = (int) Math.max(1, numDocs / maxDocsPerPartition); for (int i = 0; i < numPartitions; i++) {
public long count(boolean read) { Resource res = (read ? resources.getResourceRead() : resources.getResourceWrite()); return client.count(res.index() + "/" + res.type(), QueryUtils.parseQuery(settings)); }
public long count(boolean read) { Resource res = (read ? resources.getResourceRead() : resources.getResourceWrite()); return client.count(res.index() + "/" + res.type(), QueryUtils.parseQuery(settings)); }
public long count(boolean read) { Resource res = (read ? resources.getResourceRead() : resources.getResourceWrite()); return client.count(res.index() + "/" + res.type(), QueryUtils.parseQuery(settings)); }