/** * Retrieve the total counts for the facets (total count is same query but none of the filter queries). * * @param typeGenerator the type generator * @return counts for each facet by name. * @throws org.apache.solr.client.solrj.SolrServerException passed through. */ protected Map<String, Long> getTotalFacetCounts(DatasetTypeGenerator typeGenerator) throws SolrServerException { ObjectCount[] objectCounts = solrLoggerService .queryFacetField(getQuery(), null, typeGenerator.getType(), -1, false, null); Map<String, Long> result = new HashMap<String, Long>(); for (ObjectCount objectCount : objectCounts) { result.put(objectCount.getValue(), objectCount.getCount()); } return result; }
String query = getQuery();
.query(getQuery(), null, null, 1, 0, null, null, null, null, "time", true); if (0 < oldestRecord.getResults().getNumFound()) { SolrDocument solrDocument = oldestRecord.getResults().get(0);