public class SearchHitField extends java.lang.Object implements Streamable, java.lang.Iterable<java.lang.Object>
SearchHit
.SearchHit
Constructor and Description |
---|
SearchHitField(java.lang.String name,
java.util.List<java.lang.Object> values) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
The name of the field.
|
<T> T |
getValue()
The first value of the hit.
|
java.util.List<java.lang.Object> |
getValues()
The field values.
|
boolean |
isMetadataField() |
java.util.Iterator<java.lang.Object> |
iterator() |
java.lang.String |
name()
Deprecated.
use
getName() instead |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
static SearchHitField |
readSearchHitField(StreamInput in) |
<T> T |
value()
Deprecated.
use
getValue() instead |
java.util.List<java.lang.Object> |
values()
Deprecated.
use
getValues() instead |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
public SearchHitField(java.lang.String name, java.util.List<java.lang.Object> values)
@Deprecated public java.lang.String name()
getName()
insteadpublic java.lang.String getName()
@Deprecated public <T> T value()
getValue()
insteadpublic <T> T getValue()
@Deprecated public java.util.List<java.lang.Object> values()
getValues()
insteadpublic java.util.List<java.lang.Object> getValues()
public boolean isMetadataField()
public java.util.Iterator<java.lang.Object> iterator()
iterator
in interface java.lang.Iterable<java.lang.Object>
public static SearchHitField readSearchHitField(StreamInput in) throws java.io.IOException
java.io.IOException
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
java.io.IOException