List of usage examples for org.apache.lucene.util SparseFixedBitSet set
public void set(int i)
From source file:com.boundlessgeo.elasticsearch.geoheatmap.GeoHeatmapAggregator.java
License:Apache License
@Override public LeafBucketCollector getLeafCollector(LeafReaderContext ctx, final LeafBucketCollector sub) throws IOException { if (parentReaderContext == null) { parentReaderContext = ctx.parent; } else {/*from ww w.j a v a 2 s . c om*/ assert ctx.parent == parentReaderContext; } return new LeafBucketCollectorBase(sub, null) { @Override public void collect(int doc, long bucket) throws IOException { SparseFixedBitSet bits = buckets.get(bucket); if (bits == null) { bits = new SparseFixedBitSet(parentReaderContext.reader().maxDoc()); buckets.put(bucket, bits); } bits.set(ctx.docBase + doc); } }; }