LUCENE-4198: Make MultiTermsEnum implement impacts.

This commit is contained in:
Adrien Grand 2018-01-31 16:46:19 +01:00
parent f410df8113
commit 5cf9b9f704
1 changed files with 2 additions and 1 deletions

View File

@ -370,7 +370,8 @@ public final class MultiTermsEnum extends TermsEnum {
@Override
public 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 {