new DoubleRange("less than or equal to 10", 0.0, true, 10.0, true),
new DoubleRange("over 90", 90.0, false, 100.0, false),
new DoubleRange("90 or above", 90.0, true, 100.0, false),
new DoubleRange("over 1000", 1000.0, false, Double.POSITIVE_INFINITY, false)));
FacetsCollector fc = FacetsCollector.create(a);
IndexSearcher s = newSearcher(r);
s.search(new MatchAllDocsQuery(), fc);
List<FacetResult> result = fc.getFacetResults();
assertEquals(1, result.size());
assertEquals("field (0)\n less than 10 (10)\n less than or equal to 10 (11)\n over 90 (9)\n 90 or above (10)\n over 1000 (0)\n", FacetTestUtils.toSimpleString(result.get(0)));
r.close();
d.close();