private static class SortingLeafReader.SortingSortedDocValues extends SortedDocValues
Modifier and Type | Field and Description |
---|---|
private Sorter.DocMap |
docMap |
private SortedDocValues |
in |
Constructor and Description |
---|
SortingSortedDocValues(SortedDocValues in,
Sorter.DocMap docMap) |
Modifier and Type | Method and Description |
---|---|
BytesRef |
get(int docID)
Lookup the value for document.
|
int |
getOrd(int docID)
Returns the ordinal for the specified docID.
|
int |
getValueCount()
Returns the number of unique values.
|
BytesRef |
lookupOrd(int ord)
Retrieves the value for the specified ordinal.
|
int |
lookupTerm(BytesRef key)
If
key exists, returns its ordinal, else
returns -insertionPoint-1 , like Arrays.binarySearch . |
termsEnum
private final SortedDocValues in
private final Sorter.DocMap docMap
SortingSortedDocValues(SortedDocValues in, Sorter.DocMap docMap)
public int getOrd(int docID)
SortedDocValues
getOrd
in class SortedDocValues
docID
- document ID to lookuppublic BytesRef lookupOrd(int ord)
SortedDocValues
BytesRef
may be re-used across calls to SortedDocValues.lookupOrd(int)
so make sure to copy it
if you want
to keep it around.lookupOrd
in class SortedDocValues
ord
- ordinal to lookup (must be >= 0 and < SortedDocValues.getValueCount()
)SortedDocValues.getOrd(int)
public int getValueCount()
SortedDocValues
getValueCount
in class SortedDocValues
public BytesRef get(int docID)
BinaryDocValues
BytesRef
may be
re-used across calls to BinaryDocValues.get(int)
so make sure to
copy it
if you want to keep it
around.get
in class SortedDocValues
public int lookupTerm(BytesRef key)
SortedDocValues
key
exists, returns its ordinal, else
returns -insertionPoint-1
, like Arrays.binarySearch
.lookupTerm
in class SortedDocValues
key
- Key to look up