|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.action.get.GetResponse
public class GetResponse
The response of a get action.
GetRequest
,
Client.get(GetRequest)
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent |
---|
ToXContent.MapParams, ToXContent.Params |
Field Summary |
---|
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent |
---|
EMPTY_PARAMS |
Method Summary | |
---|---|
boolean |
exists()
Does the document exists. |
GetField |
field(String name)
|
Map<String,GetField> |
fields()
|
Map<String,GetField> |
getFields()
|
String |
getId()
The id of the document. |
String |
getIndex()
The index the document was fetched from. |
Map<String,Object> |
getSource()
|
byte[] |
getSourceAsBytes()
The source of the document if exists. |
BytesReference |
getSourceAsBytesRef()
Returns bytes reference, also un compress the source if needed. |
String |
getSourceAsString()
|
String |
getType()
The type of the document. |
long |
getVersion()
The version of the doc. |
String |
id()
The id of the document. |
String |
index()
The index the document was fetched from. |
boolean |
isExists()
Does the document exists. |
boolean |
isSourceEmpty()
Is the source empty (not available) or not. |
Iterator<GetField> |
iterator()
|
void |
readFrom(StreamInput in)
|
byte[] |
source()
The source of the document if exists. |
Map<String,Object> |
sourceAsMap()
The source of the document (As a map). |
String |
sourceAsString()
The source of the document (as a string). |
BytesReference |
sourceRef()
Returns bytes reference, also un compress the source if needed. |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params)
|
String |
type()
The type of the document. |
long |
version()
The version of the doc. |
void |
writeTo(StreamOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean exists()
public boolean isExists()
public String index()
public String getIndex()
public String type()
public String getType()
public String id()
public String getId()
public long version()
public long getVersion()
public byte[] source()
public byte[] getSourceAsBytes()
public BytesReference sourceRef()
public BytesReference getSourceAsBytesRef()
public boolean isSourceEmpty()
public String sourceAsString()
public String getSourceAsString()
public Map<String,Object> sourceAsMap() throws ElasticSearchParseException
ElasticSearchParseException
public Map<String,Object> getSource()
public Map<String,GetField> fields()
public Map<String,GetField> getFields()
public GetField field(String name)
public Iterator<GetField> iterator()
iterator
in interface Iterable<GetField>
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
IOException
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |