System.out.println(res);
long[] groupdIDs = extractFieldValues(field, res);
assertTrue(Arrays.toString(groupdIDs) + " is not the expected output", Arrays.equals(new long[] {-15000L, -14000L, -13000L, -12000L, -11000L, -10000L, -9000L, -8000L, -7000L, 0L, 10L}, groupdIDs));
}
public void test6RangeFacets() throws Exception {
SenseiRequest req = new SenseiRequest();
BrowseSelection sel = new BrowseSelection("groupid_range");
String selVal = "[* TO 10]";
sel.addValue(selVal);
req.addSelection(sel);
String field = "groupid_range";
FacetSpec fs = new FacetSpec();
fs.setMinHitCount(1);
fs.setOrderBy(FacetSortSpec.OrderValueAsc);
req.setFacetSpec(field, fs);
req.setCount(11);
req.setOffset(0);
req.addSortField(new SortField("groupid_range", SortField.LONG, false));
SenseiResult res = broker.browse(req);
System.out.println(res);
List<BrowseFacet> facets = res.getFacetAccessor(field).getFacets();
assertEquals("[* TO -12000]", facets.get(0).getValue());
assertEquals(4, facets.get(0).getFacetValueHitCount());