@Override public void collect(int doc, long owningBucketOrdinal) throws IOException { final int numOrds = segmentOrdinals.setDocument(doc); for (int i = 0; i < numOrds; i++) { final long segmentOrd = segmentOrdinals.nextOrd(); current.increment(segmentOrd, 1); } }
@Override public void collect(int doc, long owningBucketOrdinal) throws IOException { final int numOrds = globalOrdinals.setDocument(doc); for (int i = 0; i < numOrds; i++) { final long globalOrd = globalOrdinals.nextOrd(); collectExistingBucket(doc, globalOrd); } }
@Override public int setDocument(int docId) { int numDocs = inner.setDocument(docId); buffer = ArrayUtil.grow(buffer, numDocs); bufferSlot = 0; int numAcceptedOrds = 0; for (int slot = 0; slot < numDocs; slot++) { long ord = inner.nextOrd(); if (accepted.get(ord)) { buffer[numAcceptedOrds] = ord; numAcceptedOrds++; } } return numAcceptedOrds; }