/** Counts all facet dimensions across the provided hits. */ public ConcurrentSortedSetDocValuesFacetCounts(SortedSetDocValuesReaderState state, FacetsCollector hits, ExecutorService exec) throws IOException, InterruptedException { this.state = state; this.field = state.getField(); this.exec = exec; dv = state.getDocValues(); counts = new AtomicIntegerArray(state.getSize()); if (hits == null) { // browse only countAll(); } else { count(hits.getMatchingDocs()); } }