private AssertingScorer(Random random, Scorer in, TopScorer topScorer, boolean inOrder) { super(in.weight); this.random = random; this.in = in; this.topScorer = topScorer; this.inOrder = inOrder; this.docsEnumIn = new AssertingAtomicReader.AssertingDocsEnum(in, topScorer == TopScorer.NO); this.canCallNextDoc = topScorer != TopScorer.YES // not a top scorer || !SCORE_COLLECTOR_RANGE.isOverriddenAsOf(in.getClass()) // the default impl relies upon nextDoc() || !SCORE_COLLECTOR.isOverriddenAsOf(in.getClass()); // the default impl relies upon nextDoc() }
@Override public Fields get(int doc) throws IOException { Fields fields = in.get(doc); return fields == null ? null : new AssertingAtomicReader.AssertingFields(fields); }
private AssertingScorer(Random random, Scorer in) { super(in.weight); this.random = random; this.in = in; this.docsEnumIn = new AssertingAtomicReader.AssertingDocsEnum(in); }