public class GetResponse extends ActionResponse implements Iterable<GetField>, ToXContent
GetRequest,
Client.get(GetRequest)TransportResponse.EmptyToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsheadersEMPTY_PARAMS| コンストラクタと説明 |
|---|
GetResponse(GetResult getResult) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
GetField |
getField(String name) |
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.
|
Map<String,Object> |
getSourceAsMap()
The source of the document (As a map).
|
String |
getSourceAsString()
The source of the document (as a string).
|
BytesReference |
getSourceInternal()
Returns the internal source bytes, as they are returned without munging (for example,
might still be compressed).
|
String |
getType()
The type of the document.
|
long |
getVersion()
The version of the doc.
|
boolean |
isExists()
Does the document exists.
|
boolean |
isSourceEmpty()
Is the source empty (not available) or not.
|
Iterator<GetField> |
iterator() |
void |
readFrom(StreamInput in) |
static GetResponse |
readGetResponse(StreamInput in) |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out) |
remoteAddress, remoteAddresscontextSize, copyContextAndHeadersFrom, copyContextFrom, copyHeadersFrom, getContext, getFromContext, getFromContext, getHeader, getHeaders, hasHeader, hasInContext, isContextEmpty, putAllInContext, putHeader, putInContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic GetResponse(GetResult getResult)
public boolean isExists()
public String getIndex()
public String getType()
public String getId()
public long getVersion()
public byte[] getSourceAsBytes()
public BytesReference getSourceInternal()
public BytesReference getSourceAsBytesRef()
public boolean isSourceEmpty()
public String getSourceAsString()
public Map<String,Object> getSourceAsMap() throws ElasticsearchParseException
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent インタフェース内 ToXContentIOExceptionpublic static GetResponse readGetResponse(StreamInput in) throws IOException
IOExceptionpublic void readFrom(StreamInput in) throws IOException
readFrom インタフェース内 StreamablereadFrom クラス内 ActionResponseIOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo インタフェース内 StreamablewriteTo クラス内 ActionResponseIOExceptionCopyright © 2009–2016. All rights reserved.