|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.index.DocValues.Source
org.apache.lucene.index.DocValues.SortedSource
public abstract static class DocValues.SortedSource
A sorted variant of DocValues.Source for byte[] values per document.
| Field Summary |
|---|
| Fields inherited from class org.apache.lucene.index.DocValues.Source |
|---|
type |
| Constructor Summary | |
|---|---|
protected |
DocValues.SortedSource(DocValues.Type type,
Comparator<BytesRef> comparator)
Sole constructor. |
| Method Summary | |
|---|---|
DocValues.SortedSource |
asSortedSource()
If this DocValues.Source is sorted this method will return an instance of
DocValues.SortedSource otherwise UOE |
abstract BytesRef |
getByOrd(int ord,
BytesRef result)
Returns value for specified ord. |
BytesRef |
getBytes(int docID,
BytesRef bytesRef)
Returns a BytesRef for the given document id or throws an
UnsupportedOperationException if this source doesn't support
byte[] values. |
Comparator<BytesRef> |
getComparator()
Returns the comparator used to order the BytesRefs. |
abstract PackedInts.Reader |
getDocToOrd()
Returns the PackedInts.Reader impl that maps document to ord. |
int |
getOrdByValue(BytesRef value,
BytesRef spare)
Lookup ord by value. |
abstract int |
getValueCount()
Returns the number of unique values in this sorted source |
boolean |
hasPackedDocToOrd()
Return true if it's safe to call getDocToOrd(). |
abstract int |
ord(int docID)
Returns ord for specified docID. |
| Methods inherited from class org.apache.lucene.index.DocValues.Source |
|---|
getArray, getFloat, getInt, getType, hasArray |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DocValues.SortedSource(DocValues.Type type,
Comparator<BytesRef> comparator)
| Method Detail |
|---|
public BytesRef getBytes(int docID,
BytesRef bytesRef)
DocValues.SourceBytesRef for the given document id or throws an
UnsupportedOperationException if this source doesn't support
byte[] values.
getBytes in class DocValues.Sourcepublic abstract int ord(int docID)
Comparator value.
public abstract BytesRef getByOrd(int ord,
BytesRef result)
public boolean hasPackedDocToOrd()
getDocToOrd().
public abstract PackedInts.Reader getDocToOrd()
public Comparator<BytesRef> getComparator()
public int getOrdByValue(BytesRef value,
BytesRef spare)
value - the value to look upspare - a spare BytesRef instance used to compare internal
values to the given value. Must not be null
(-(ord)-1), defined as the ordinal of the first
element that is greater than the given value (the insertion
point). This guarantees that the return value will always be
>= 0 if the given value is found.public DocValues.SortedSource asSortedSource()
DocValues.SourceDocValues.Source is sorted this method will return an instance of
DocValues.SortedSource otherwise UOE
asSortedSource in class DocValues.Sourcepublic abstract int getValueCount()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||