コード例 #1
0
 @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);
   }
 }
コード例 #2
0
 @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);
   }
 }
コード例 #3
0
    @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;
    }