Apache Lucene open-source search software
LUCENE-4198: Make MultiTermsEnum implement impacts.
Adrien Grand5cf9b9f70425
diff --git a/lucene/core/src/java/org/apache/lucene/index/MultiTermsEnum.java b/lucene/core/src/java/org/apache/lucene/index/MultiTermsEnum.javaindex 7de84273455..4aad5c8ab04 100644--- a/lucene/core/src/java/org/apache/lucene/index/MultiTermsEnum.java+++ b/lucene/core/src/java/org/apache/lucene/index/MultiTermsEnum.java@@ -370,7 +370,8 @@ public final class MultiTermsEnum extends TermsEnum {@Overridepublic ImpactsEnum impacts(SimScorer scorer, int flags) throws IOException {- throw new UnsupportedOperationException();+ // implemented to not fail CheckIndex, but you shouldn't be using impacts on a slow reader+ return new SlowImpactsEnum(postings(null, flags), scorer.score(Float.MAX_VALUE, 1));}final static class TermsEnumWithSlice {