Package org.apache.lucene.index
Class Sorter.DocMap
- java.lang.Object
-
- org.apache.lucene.index.Sorter.DocMap
-
- Enclosing class:
- Sorter
public abstract static class Sorter.DocMap extends Object
A permutation of doc IDs. For every document ID between0andIndexReader.maxDoc(),oldToNew(newToOld(docID))must returndocID.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDocMap()Sole constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract intnewToOld(int docID)Given the ordinal of a doc ID, return its doc ID in the original index.abstract intoldToNew(int docID)Given a doc ID from the original index, return its ordinal in the sorted index.abstract intsize()Return the number of documents in this map.
-
-
-
Method Detail
-
oldToNew
public abstract int oldToNew(int docID)
Given a doc ID from the original index, return its ordinal in the sorted index.
-
newToOld
public abstract int newToOld(int docID)
Given the ordinal of a doc ID, return its doc ID in the original index.
-
size
public abstract int size()
Return the number of documents in this map. This must be equal to thenumber of documentsof theLeafReaderwhich is sorted.
-
-