_nDays = nDays;
_dataUnit = dataUnit;
}
private DocIdSet buildFilterSet(BoboIndexReader boboReader) throws IOException{
FacetHandler facetHandler = boboReader.getFacetHandler(_column);
if (facetHandler!=null){
DecimalFormat formatter = new DecimalFormat(DefaultSenseiInterpreter.DEFAULT_FORMAT_STRING_MAP.get(MetaType.Long));
BrowseSelection sel = new BrowseSelection(_column);
long duration = _dataUnit.convert(_nDays, TimeUnit.DAYS);
long now = _dataUnit.convert(System.currentTimeMillis(), TimeUnit.MILLISECONDS);
long from = now - duration;
sel.addValue("["+formatter.format(from)+" TO *]");
return facetHandler.buildFilter(sel).getDocIdSet(boboReader);
}
throw new IllegalStateException("no facet handler defined with column: "+_column);
}