|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.index.SortedSetDocValues
org.apache.lucene.index.SingletonSortedSetDocValues
public class SingletonSortedSetDocValues
Exposes multi-valued view over a single-valued instance.
This can be used if you want to have one multi-valued implementation against e.g. FieldCache.getDocTermOrds that also works for single-valued fields.
| Field Summary |
|---|
| Fields inherited from class org.apache.lucene.index.SortedSetDocValues |
|---|
EMPTY, NO_MORE_ORDS |
| Constructor Summary | |
|---|---|
SingletonSortedSetDocValues(SortedDocValues in)
Creates a multi-valued view over the provided SortedDocValues |
|
| Method Summary | |
|---|---|
long |
getValueCount()
Returns the number of unique values. |
void |
lookupOrd(long ord,
BytesRef result)
Retrieves the value for the specified ordinal. |
long |
lookupTerm(BytesRef key)
If key exists, returns its ordinal, else
returns -insertionPoint-1, like Arrays.binarySearch. |
long |
nextOrd()
Returns the next ordinal for the current document (previously set by SortedSetDocValues.setDocument(int). |
void |
setDocument(int docID)
Sets iteration to the specified docID |
| Methods inherited from class org.apache.lucene.index.SortedSetDocValues |
|---|
termsEnum |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SingletonSortedSetDocValues(SortedDocValues in)
| Method Detail |
|---|
public long nextOrd()
SortedSetDocValuesSortedSetDocValues.setDocument(int).
nextOrd in class SortedSetDocValuesSortedSetDocValues.NO_MORE_ORDS.
ordinals are dense, start at 0, then increment by 1 for
the next value in sorted order.public void setDocument(int docID)
SortedSetDocValues
setDocument in class SortedSetDocValuesdocID - document ID
public void lookupOrd(long ord,
BytesRef result)
SortedSetDocValues
lookupOrd in class SortedSetDocValuesord - ordinal to lookupresult - will be populated with the ordinal's valueSortedSetDocValues.nextOrd()public long getValueCount()
SortedSetDocValues
getValueCount in class SortedSetDocValuespublic long lookupTerm(BytesRef key)
SortedSetDocValueskey exists, returns its ordinal, else
returns -insertionPoint-1, like Arrays.binarySearch.
lookupTerm in class SortedSetDocValueskey - Key to look up
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||