text: public List<MatchingDocs> getMatchingDocs() {List<MatchingDocs> matchingDocs = super.getMatchingDocs();if (totalHits == NOT_CALCULATED) {totalHits = 0;for (MatchingDocs md : matchingDocs) {totalHits += md.totalHits;}}if (totalHits <= sampleSize) {return matchingDocs;}if (sampledDocs == null) {samplingRate = (1.0 * sampleSize) / totalHits;sampledDocs = createSampledDocs(matchingDocs);}return sampledDocs;}