|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.index.DocValues.Source
public abstract static class DocValues.Source
Source of per document values like long, double or BytesRef
depending on the DocValues fields DocValues.Type. Source
implementations provide random access semantics similar to array lookups
DocValues.getSource(),
DocValues.getDirectSource()| Field Summary | |
|---|---|
protected DocValues.Type |
type
DocValues.Type of this Source. |
| Constructor Summary | |
|---|---|
protected |
DocValues.Source(DocValues.Type type)
Sole constructor. |
| Method Summary | |
|---|---|
DocValues.SortedSource |
asSortedSource()
If this DocValues.Source is sorted this method will return an instance of
DocValues.SortedSource otherwise UOE |
Object |
getArray()
Returns the internal array representation iff this DocValues.Source uses an
array as its inner representation, otherwise UOE. |
BytesRef |
getBytes(int docID,
BytesRef ref)
Returns a BytesRef for the given document id or throws an
UnsupportedOperationException if this source doesn't support
byte[] values. |
double |
getFloat(int docID)
Returns a double for the given document id or throws an UnsupportedOperationException if this source doesn't support
double values. |
long |
getInt(int docID)
Returns a long for the given document id or throws an UnsupportedOperationException if this source doesn't support
long values. |
DocValues.Type |
getType()
Returns the DocValues.Type of this source. |
boolean |
hasArray()
Returns true iff this DocValues.Source exposes an array via
getArray() otherwise false. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final DocValues.Type type
DocValues.Type of this Source.
| Constructor Detail |
|---|
protected DocValues.Source(DocValues.Type type)
| Method Detail |
|---|
public long getInt(int docID)
UnsupportedOperationException if this source doesn't support
long values.
UnsupportedOperationException - if this source doesn't support long values.public double getFloat(int docID)
UnsupportedOperationException if this source doesn't support
double values.
UnsupportedOperationException - if this source doesn't support double values.
public BytesRef getBytes(int docID,
BytesRef ref)
BytesRef for the given document id or throws an
UnsupportedOperationException if this source doesn't support
byte[] values.
UnsupportedOperationException - if this source doesn't support byte[] values.public DocValues.Type getType()
DocValues.Type of this source.
DocValues.Type of this source.public boolean hasArray()
true iff this DocValues.Source exposes an array via
getArray() otherwise false.
true iff this DocValues.Source exposes an array via
getArray() otherwise false.public Object getArray()
DocValues.Source uses an
array as its inner representation, otherwise UOE.
public DocValues.SortedSource asSortedSource()
DocValues.Source is sorted this method will return an instance of
DocValues.SortedSource otherwise UOE
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||