@Override public int oldToNew(int docID) { return (int) oldToNew.get(docID); }
@Override public long get(long ord) { return ord + deltas.get(ord); } };
@Override public int newToOld(int docID) { return (int) newToOld.get(docID); }
/** * Given global ordinal, returns the ordinal of the first segment which contains * this ordinal (the corresponding to the segment return {@link #getFirstSegmentNumber}). */ public long getFirstSegmentOrd(long globalOrd) { return globalOrd - globalOrdDeltas.get(globalOrd); }
@Override public int get(int docID) { if (liveDocs == null) { return docBase + docID; } else if (liveDocs.get(docID)) { return docBase + (int) delDocMap.get(docID); } else { return -1; } } };
/** * Given a global ordinal, returns the index of the first * segment that contains this term. */ public int getFirstSegmentNumber(long globalOrd) { return segmentMap.newToOld((int) firstSegments.get(globalOrd)); }
@Override public final long get(long index) { assert index >= 0 && index < size(); final int block = (int) (index >> pageShift); final int element = (int) (index & pageMask); return get(block, element); }
@Override public int get(int docID) { if (liveDocs == null || liveDocs.get(docID)) { return (int) remapped.get(docID); } else { return -1; } } };
@Override public long nextOrd() throws IOException { if (currentOffset == currentEndOffset) { return SortedSetDocValues.NO_MORE_ORDS; } else { return ords.get(currentOffset++); } }
@Override public int ordValue() { return (int) ords.get(currentStartOffset); }
docs[(int) newToOld.get(i)] = i;
@Override public BytesRef lookupOrd(long ord) { assert ord >= 0; bytes.fill(scratch, termOrdToBytesOffset.get(ord)); return scratch; }
@Override public long get(long ord) { return ord + deltas.get(ord); } };
@Override public long get(long ord) { return ord + deltas.get(ord); } };
/** * Given global ordinal, returns the ordinal of the first segment which contains * this ordinal (the corresponding to the segment return {@link #getFirstSegmentNumber}). */ public long getFirstSegmentOrd(long globalOrd) { return globalOrd - globalOrdDeltas.get(globalOrd); }
/** * Given a global ordinal, returns the index of the first * segment that contains this term. */ public int getFirstSegmentNumber(long globalOrd) { return segmentMap.newToOld((int) firstSegments.get(globalOrd)); }
@Override public BytesRef lookupOrd(long ord) { assert ord >= 0; bytes.fill(scratch, termOrdToBytesOffset.get(ord)); return scratch; }
/** * Given a global ordinal, returns the index of the first * segment that contains this term. */ public int getFirstSegmentNumber(long globalOrd) { return segmentMap.newToOld((int) firstSegments.get(globalOrd)); }