|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.index.BinaryDocValues
org.apache.lucene.index.SortedDocValues
public abstract class SortedDocValues
A per-document byte[] with presorted values.
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.
| Field Summary | |
|---|---|
static SortedDocValues |
EMPTY
An empty SortedDocValues which returns BinaryDocValues.MISSING for every document |
| Fields inherited from class org.apache.lucene.index.BinaryDocValues |
|---|
MISSING |
| Constructor Summary | |
|---|---|
protected |
SortedDocValues()
Sole constructor. |
| Method Summary | |
|---|---|
void |
get(int docID,
BytesRef result)
Lookup the value for document. |
abstract int |
getOrd(int docID)
Returns the ordinal for the specified docID. |
abstract int |
getValueCount()
Returns the number of unique values. |
abstract void |
lookupOrd(int ord,
BytesRef result)
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 |
termsEnum()
Returns a TermsEnum over the values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final SortedDocValues EMPTY
BinaryDocValues.MISSING for every document
| Constructor Detail |
|---|
protected SortedDocValues()
| Method Detail |
|---|
public abstract int getOrd(int docID)
docID - document ID to lookup
public abstract void lookupOrd(int ord,
BytesRef result)
ord - ordinal to lookupresult - will be populated with the ordinal's valuegetOrd(int)public abstract int getValueCount()
public void get(int docID,
BytesRef result)
BinaryDocValues
get in class BinaryDocValuespublic int lookupTerm(BytesRef key)
key exists, returns its ordinal, else
returns -insertionPoint-1, like Arrays.binarySearch.
key - Key to look uppublic TermsEnum termsEnum()
TermsEnum over the values.
The enum supports TermsEnum.ord() and TermsEnum.seekExact(long).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||