return getFacetCountCollectorSource(sel, ospec, false);
}
public FacetCountCollectorSource getFacetCountCollectorSource(final BrowseSelection sel,final FacetSpec ospec, final boolean groupMode) {
if (groupMode) {
return new FacetCountCollectorSource(){
@Override
public FacetCountCollector getFacetCountCollector(
BoboIndexReader reader, int docBase) {
FacetDataCache dataCache = SimpleFacetHandler.this.getFacetData(reader);
return new SimpleGroupByFacetCountCollector(_name,dataCache,docBase,sel,ospec);
}
};
}
else {
return new FacetCountCollectorSource(){
@Override
public FacetCountCollector getFacetCountCollector(
BoboIndexReader reader, int docBase) {
FacetDataCache dataCache = SimpleFacetHandler.this.getFacetData(reader);
return new SimpleFacetCountCollector(_name,dataCache,docBase,sel,ospec);