public class SingletonSortedSetDocValues extends SortedSetDocValues
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.
EMPTY, NO_MORE_ORDS| Constructor and Description | 
|---|
| SingletonSortedSetDocValues(SortedDocValues in)Creates a multi-valued view over the provided SortedDocValues | 
| Modifier and Type | Method and Description | 
|---|---|
| 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  keyexists, returns its ordinal, else
  returns-insertionPoint-1, likeArrays.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 | 
termsEnumpublic SingletonSortedSetDocValues(SortedDocValues in)
public SortedDocValues getSortedDocValues()
SortedDocValuespublic 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)
SortedSetDocValuessetDocument in class SortedSetDocValuesdocID - document IDpublic void lookupOrd(long ord,
             BytesRef result)
SortedSetDocValueslookupOrd in class SortedSetDocValuesord - ordinal to lookupresult - will be populated with the ordinal's valueSortedSetDocValues.nextOrd()public long getValueCount()
SortedSetDocValuesgetValueCount 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 upCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.