|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 | |
---|---|
SortedDocValues |
getSortedDocValues()
Return the wrapped SortedDocValues |
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 SortedDocValues getSortedDocValues()
SortedDocValues
public long nextOrd()
SortedSetDocValues
SortedSetDocValues.setDocument(int)
.
nextOrd
in class SortedSetDocValues
SortedSetDocValues.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 SortedSetDocValues
docID
- document IDpublic void lookupOrd(long ord, BytesRef result)
SortedSetDocValues
lookupOrd
in class SortedSetDocValues
ord
- ordinal to lookupresult
- will be populated with the ordinal's valueSortedSetDocValues.nextOrd()
public long getValueCount()
SortedSetDocValues
getValueCount
in class SortedSetDocValues
public long lookupTerm(BytesRef key)
SortedSetDocValues
key
exists, returns its ordinal, else
returns -insertionPoint-1
, like Arrays.binarySearch
.
lookupTerm
in class SortedSetDocValues
key
- Key to look up
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |