// "org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 1024"
// String whereClause = "WHERE ISDESCENDANTNODE([/repositories/" + repositoryId + "/content])";
// Query query = queryManager.createQuery( "SELECT size FROM [archiva:artifact] " + whereClause,
// Query.JCR_SQL2 );
String whereClause = "WHERE jcr:path LIKE '/repositories/" + repositoryId + "/content/%'";
Query query = queryManager.createQuery( "SELECT size FROM archiva:artifact " + whereClause, Query.SQL );
QueryResult queryResult = query.execute();
Map<String, Integer> totalByType = new HashMap<String, Integer>();
long totalSize = 0, totalArtifacts = 0;