new FloatRange("less than or equal to 10", 0.0f, true, 10.0f, true),
new FloatRange("over 90", 90.0f, false, 100.0f, false),
new FloatRange("90 or above", 90.0f, true, 100.0f, false),
new FloatRange("over 1000", 1000.0f, false, Float.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();