public class GetResult extends Object implements Streamable, Iterable<GetField>, ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsEMPTY_PARAMS| コンストラクタと説明 |
|---|
GetResult(String index,
String type,
String id,
long version,
boolean exists,
BytesReference source,
Map<String,GetField> fields) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
GetField |
field(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() |
String |
getType()
The type of the document.
|
long |
getVersion()
The version of the doc.
|
BytesReference |
internalSourceRef()
Internal source representation, might be compressed....
|
boolean |
isExists()
Does the document exists.
|
boolean |
isSourceEmpty()
Is the source empty (not available) or not.
|
Iterator<GetField> |
iterator() |
void |
readFrom(StreamInput in) |
static GetResult |
readGetResult(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) |
XContentBuilder |
toXContentEmbedded(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic boolean isExists()
public String getIndex()
public String getType()
public String getId()
public long getVersion()
public byte[] source()
public BytesReference sourceRef()
public BytesReference internalSourceRef()
public boolean isSourceEmpty()
public String sourceAsString()
public Map<String,Object> sourceAsMap() throws ElasticsearchParseException
public XContentBuilder toXContentEmbedded(XContentBuilder builder, ToXContent.Params params) throws IOException
IOExceptionpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent インタフェース内 ToXContentIOExceptionpublic static GetResult readGetResult(StreamInput in) throws IOException
IOExceptionpublic void readFrom(StreamInput in) throws IOException
readFrom インタフェース内 StreamableIOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo インタフェース内 StreamableIOExceptionCopyright © 2009–2016. All rights reserved.