DirectoryTaxonomyReader tr = new DirectoryTaxonomyReader(tDir);
// Get all of the documents and run the query, then do different
// facet counts and compare to control
Query q = new TermQuery(new Term("content", "alpha"));
ScoredDocIdCollector scoredDoc = ScoredDocIdCollector.create(is.maxDoc(), true);
// Collector collector = new MultiCollector(scoredDoc);
is.search(q, scoredDoc);
CountFacetRequest cfra23 = new CountFacetRequest(
new CategoryPath("a"), 2);
cfra23.setDepth(3);
cfra23.setResultMode(ResultMode.PER_NODE_IN_TREE);
CountFacetRequest cfra22 = new CountFacetRequest(
new CategoryPath("a"), 2);
cfra22.setDepth(2);
cfra22.setResultMode(ResultMode.PER_NODE_IN_TREE);
CountFacetRequest cfra21 = new CountFacetRequest(
new CategoryPath("a"), 2);
cfra21.setDepth(1);
cfra21.setResultMode(ResultMode.PER_NODE_IN_TREE);
CountFacetRequest cfrb22 = new CountFacetRequest(
new CategoryPath("a", "b"), 2);
cfrb22.setDepth(2);
cfrb22.setResultMode(ResultMode.PER_NODE_IN_TREE);
CountFacetRequest cfrb23 = new CountFacetRequest(
new CategoryPath("a", "b"), 2);
cfrb23.setDepth(3);
cfrb23.setResultMode(ResultMode.PER_NODE_IN_TREE);
CountFacetRequest cfrb21 = new CountFacetRequest(
new CategoryPath("a", "b"), 2);
cfrb21.setDepth(1);
cfrb21.setResultMode(ResultMode.PER_NODE_IN_TREE);
CountFacetRequest doctor = new CountFacetRequest(
new CategoryPath("Doctor"), 2);
doctor.setDepth(1);
doctor.setResultMode(ResultMode.PER_NODE_IN_TREE);
CountFacetRequest cfrb20 = new CountFacetRequest(
new CategoryPath("a", "b"), 2);
cfrb20.setDepth(0);
cfrb20.setResultMode(ResultMode.PER_NODE_IN_TREE);
FacetSearchParams facetSearchParams = new FacetSearchParams(iParams);
facetSearchParams.addFacetRequest(cfra23);
facetSearchParams.addFacetRequest(cfra22);
facetSearchParams.addFacetRequest(cfra21);
facetSearchParams.addFacetRequest(cfrb23);
facetSearchParams.addFacetRequest(cfrb22);
facetSearchParams.addFacetRequest(cfrb21);
facetSearchParams.addFacetRequest(doctor);
facetSearchParams.addFacetRequest(cfrb20);
IntArrayAllocator iaa = new IntArrayAllocator(PartitionsUtils.partitionSize(facetSearchParams,tr), 1);
FloatArrayAllocator faa = new FloatArrayAllocator(PartitionsUtils.partitionSize(facetSearchParams,tr), 1);
FacetsAccumulator fctExtrctr = new StandardFacetsAccumulator(facetSearchParams, is.getIndexReader(), tr, iaa, faa);
fctExtrctr.setComplementThreshold(FacetsAccumulator.DISABLE_COMPLEMENT);
long start = System.currentTimeMillis();
List<FacetResult> facetResults = fctExtrctr.accumulate(scoredDoc.getScoredDocIDs());
long end = System.currentTimeMillis();
if (VERBOSE) {
System.out.println("Time: " + (end - start));
}