}
private void calculateSubHits() throws IOException {
if (!subHitsCalculated) {
contextScorer.score(new HitCollector() {
public void collect(int doc, float score) {
contextHits.set(doc);
}
}); // find all
if (contextHits.isEmpty()) {
// no need to execute sub scorer, context is empty
} else {
subScorer.score(new HitCollector() {
public void collect(int doc, float score) {
subHits.set(doc);
if (score != DEFAULT_SCORE.floatValue()) {
scores.put(new Integer(doc), new Float(score));
}