if (_collapsedCounts==null){
_collapsedCounts = new int[_bucketValues.size()];
FacetDataCache dataCache = _subCollector._dataCache;
TermValueList<?> subList = dataCache.valArray;
int[] subcounts = _subCollector._count;
BitVector indexSet = new BitVector(subcounts.length);
int c = 0;
int i = 0;
for (String val : _bucketValues){
if (val.length()>0){
String[] subVals = _predefinedBuckets.get(val);
int count = 0;
for (String subVal : subVals){
int index = subList.indexOf(subVal);
if (index>0){
int subcount = subcounts[index];
count+=subcount;
if (!indexSet.get(index)){
indexSet.set(index);
c+=dataCache.freqs[index];
}
}
}
_collapsedCounts[i] = count;