@Override public LeafBucketCollector getLeafCollector(LeafReaderContext ctx, final LeafBucketCollector sub) throws IOException { final DocValueBits docsWithValue; if (valuesSource != null) { docsWithValue = valuesSource.docsWithValue(ctx); } else { docsWithValue = new DocValueBits() { @Override public boolean advanceExact(int doc) throws IOException { return false; } }; } return new LeafBucketCollectorBase(sub, docsWithValue) { @Override public void collect(int doc, long bucket) throws IOException { if (docsWithValue.advanceExact(doc) == false) { collectBucket(sub, doc, bucket); } } }; }
@Override public LeafBucketCollector getLeafCollector(LeafReaderContext ctx, final LeafBucketCollector sub) throws IOException { final DocValueBits docsWithValue; if (valuesSource != null) { docsWithValue = valuesSource.docsWithValue(ctx); } else { docsWithValue = new DocValueBits() { @Override public boolean advanceExact(int doc) throws IOException { return false; } }; } return new LeafBucketCollectorBase(sub, docsWithValue) { @Override public void collect(int doc, long bucket) throws IOException { if (docsWithValue.advanceExact(doc) == false) { collectBucket(sub, doc, bucket); } } }; }
@Override public LeafBucketCollector getLeafCollector(LeafReaderContext ctx, final LeafBucketCollector sub) throws IOException { final DocValueBits docsWithValue; if (valuesSource != null) { docsWithValue = valuesSource.docsWithValue(ctx); } else { docsWithValue = new DocValueBits() { @Override public boolean advanceExact(int doc) throws IOException { return false; } }; } return new LeafBucketCollectorBase(sub, docsWithValue) { @Override public void collect(int doc, long bucket) throws IOException { if (docsWithValue.advanceExact(doc) == false) { collectBucket(sub, doc, bucket); } } }; }
@Override public LeafBucketCollector getLeafCollector(LeafReaderContext ctx, final LeafBucketCollector sub) throws IOException { final Bits docsWithValue; if (valuesSource != null) { docsWithValue = valuesSource.docsWithValue(ctx); } else { docsWithValue = new Bits.MatchNoBits(ctx.reader().maxDoc()); } return new LeafBucketCollectorBase(sub, docsWithValue) { @Override public void collect(int doc, long bucket) throws IOException { if (docsWithValue != null && !docsWithValue.get(doc)) { collectBucket(sub, doc, bucket); } } }; }
@Override public LeafBucketCollector getLeafCollector(LeafReaderContext ctx, final LeafBucketCollector sub) throws IOException { final Bits docsWithValue; if (valuesSource != null) { docsWithValue = valuesSource.docsWithValue(ctx); } else { docsWithValue = new Bits.MatchNoBits(ctx.reader().maxDoc()); } return new LeafBucketCollectorBase(sub, docsWithValue) { @Override public void collect(int doc, long bucket) throws IOException { if (docsWithValue != null && !docsWithValue.get(doc)) { collectBucket(sub, doc, bucket); } } }; }