index100Docs(indexDir, taxoDir);
IndexReader r = IndexReader.open(indexDir);
TaxonomyReader tr = new DirectoryTaxonomyReader(taxoDir);
FacetSearchParams fsp = new FacetSearchParams();
CountFacetRequest facetRequest = new CountFacetRequest(new CategoryPath("root"), 10);
// Setting the depth to '2', should potentially get all categories
facetRequest.setDepth(2);
facetRequest.setResultMode(ResultMode.PER_NODE_IN_TREE);
fsp.addFacetRequest(facetRequest);
// Craft sampling params to enforce sampling
final SamplingParams params = new SamplingParams();
params.setMinSampleSize(2);
params.setMaxSampleSize(50);