|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.index.get.GetResult
public class GetResult
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 |
Constructor Summary | |
---|---|
GetResult(String index,
String type,
String id,
long version,
boolean exists,
BytesReference source,
Map<String,GetField> fields)
|
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()
|
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. |
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)
|
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 |
Constructor Detail |
---|
public GetResult(String index, String type, String id, long version, boolean exists, BytesReference source, Map<String,GetField> fields)
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 BytesReference sourceRef()
public BytesReference internalSourceRef()
public boolean isSourceEmpty()
public String sourceAsString()
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 toXContentEmbedded(XContentBuilder builder, ToXContent.Params params) throws IOException
IOException
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
IOException
public static GetResult readGetResult(StreamInput in) throws IOException
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 |