* faceting, with DrillSideways and taxonomy. */
public void testMixedRangeAndNonRangeTaxonomy() throws Exception {
Directory d = newDirectory();
RandomIndexWriter w = new RandomIndexWriter(random(), d);
Directory td = newDirectory();
DirectoryTaxonomyWriter tw = new DirectoryTaxonomyWriter(td, IndexWriterConfig.OpenMode.CREATE);
FacetFields ff = new FacetFields(tw);
for (long l = 0; l < 100; l++) {
Document doc = new Document();
// For computing range facet counts:
doc.add(new NumericDocValuesField("field", l));
// For drill down by numeric range:
doc.add(new LongField("field", l, Field.Store.NO));
CategoryPath cp;
if ((l&3) == 0) {
cp = new CategoryPath("dim", "a");
} else {
cp = new CategoryPath("dim", "b");
}
ff.addFields(doc, Collections.singletonList(cp));
w.addDocument(doc);
}
final IndexReader r = w.getReader();
w.close();
final TaxonomyReader tr = new DirectoryTaxonomyReader(tw);
tw.close();
IndexSearcher s = newSearcher(r);
final CountFacetRequest countRequest = new CountFacetRequest(new CategoryPath("dim"), 2);
final RangeFacetRequest<LongRange> rangeRequest = new RangeFacetRequest<LongRange>("field",