public abstract class SortedDocValues extends BinaryDocValues
Per-Document values in a SortedDocValues are deduplicated, dereferenced, and sorted into a dictionary of unique values. A pointer to the dictionary value (ordinal) can be retrieved for each document. Ordinals are dense and in increasing sorted order.
NO_MORE_DOCS
Modifier | Constructor and Description |
---|---|
protected |
SortedDocValues()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
advanceExact(int target)
Advance the iterator to exactly
target and return whether
target has a value. |
BytesRef |
binaryValue()
Returns the binary value for the current document ID.
|
abstract int |
getValueCount()
Returns the number of unique values.
|
TermsEnum |
intersect(CompiledAutomaton automaton)
Returns a
TermsEnum over the values, filtered by a CompiledAutomaton
The enum supports TermsEnum.ord() . |
abstract 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 . |
abstract int |
ordValue()
Returns the ordinal for the current docID.
|
TermsEnum |
termsEnum()
Returns a
TermsEnum over the values. |
advance, all, cost, docID, empty, nextDoc, range, slowAdvance
protected SortedDocValues()
public abstract int ordValue() throws IOException
advanceExact(int)
returned false
.IOException
public abstract BytesRef lookupOrd(int ord) throws IOException
BytesRef
may be re-used across calls to lookupOrd(int)
so make sure to copy it
if you want
to keep it around.ord
- ordinal to lookup (must be >= 0 and < getValueCount()
)IOException
ordValue()
public BytesRef binaryValue() throws IOException
BinaryDocValues
advanceExact(int)
returned false
.binaryValue
in class BinaryDocValues
IOException
public abstract int getValueCount()
public int lookupTerm(BytesRef key) throws IOException
key
exists, returns its ordinal, else
returns -insertionPoint-1
, like Arrays.binarySearch
.key
- Key to look upIOException
public TermsEnum termsEnum() throws IOException
TermsEnum
over the values.
The enum supports TermsEnum.ord()
and TermsEnum.seekExact(long)
.IOException
public TermsEnum intersect(CompiledAutomaton automaton) throws IOException
TermsEnum
over the values, filtered by a CompiledAutomaton
The enum supports TermsEnum.ord()
.IOException
public abstract boolean advanceExact(int target) throws IOException
target
and return whether
target
has a value.
target
must be greater than or equal to the current
doc ID
and must be a valid doc ID, ie. ≥ 0 and
< maxDoc
.
After this method returns, DocIdSetIterator.docID()
returns target
.IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.