final FakeScorer scorer = new FakeScorer();
Map<String, Scorer> context = new HashMap<String, Scorer>();
context.put("scorer", scorer);
final FunctionValues fvalues = valueSource.getValues(context, matchingDocs.context);
final int length = matchingDocs.bits.length();
final float[] aggValues = facetArrays.getFloatArray();
int doc = 0;
int scoresIdx = 0;
while (doc < length && (doc = matchingDocs.bits.nextSetBit(doc)) != -1) {
scorer.docID = doc;
scorer.score = matchingDocs.scores[scoresIdx++];
cli.getOrdinals(doc, ordinals);
final int upto = ordinals.offset + ordinals.length;
float val = (float) fvalues.doubleVal(doc);
for (int i = ordinals.offset; i < upto; i++) {
aggValues[ordinals.ints[i]] += val;
}
++doc;
}