Package org.elasticsearch.action.index
Class IndexResponse
- All Implemented Interfaces:
WriteResponse
,Writeable
,StatusToXContentObject
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentObject
,org.elasticsearch.core.RefCounted
A response of an index operation,
- See Also:
IndexRequest
,Client.index(IndexRequest)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.action.DocWriteResponse
DocWriteResponse.Result
Nested classes/interfaces inherited from class org.elasticsearch.action.support.replication.ReplicationResponse
ReplicationResponse.ShardInfo
Nested classes/interfaces inherited from class org.elasticsearch.action.ActionResponse
ActionResponse.Empty
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields inherited from class org.elasticsearch.action.DocWriteResponse
result
Fields inherited from class org.elasticsearch.action.support.replication.ReplicationResponse
EMPTY
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionIndexResponse(ShardId shardId, String type, String id, long seqNo, long primaryTerm, long version, boolean created)
IndexResponse(ShardId shardId, StreamInput in)
-
Method Summary
Modifier and TypeMethodDescriptionstatic IndexResponse
fromXContent(org.elasticsearch.common.xcontent.XContentParser parser)
static void
parseXContentFields(org.elasticsearch.common.xcontent.XContentParser parser, IndexResponse.Builder context)
Parse the current token and update the parsing context appropriately.status()
returns the rest status for this response (based onReplicationResponse.ShardInfo.status()
toString()
Methods inherited from class org.elasticsearch.action.DocWriteResponse
forcedRefresh, getId, getIndex, getLocation, getPrimaryTerm, getResult, getSeqNo, getShardId, getType, getVersion, innerToXContent, parseInnerToXContent, setForcedRefresh, toXContent, writeThin, writeTo
Methods inherited from class org.elasticsearch.action.support.replication.ReplicationResponse
getShardInfo, setShardInfo
Methods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRef
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
IndexResponse
- Throws:
IOException
-
IndexResponse
- Throws:
IOException
-
IndexResponse
-
-
Method Details
-
status
Description copied from class:DocWriteResponse
returns the rest status for this response (based onReplicationResponse.ShardInfo.status()
- Specified by:
status
in interfaceStatusToXContentObject
- Overrides:
status
in classDocWriteResponse
-
toString
-
fromXContent
public static IndexResponse fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws IOException- Throws:
IOException
-
parseXContentFields
public static void parseXContentFields(org.elasticsearch.common.xcontent.XContentParser parser, IndexResponse.Builder context) throws IOExceptionParse the current token and update the parsing context appropriately.- Throws:
IOException
-