Class IndexResponse

All Implemented Interfaces:
WriteResponse, Writeable, org.elasticsearch.common.util.concurrent.RefCounted, StatusToXContentObject, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject

public class IndexResponse
extends DocWriteResponse
A response of an index operation,
See Also:
IndexRequest, Client.index(IndexRequest)
  • Constructor Details

    • IndexResponse

      public IndexResponse​(ShardId shardId, StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
    • IndexResponse

      public IndexResponse​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
    • IndexResponse

      public IndexResponse​(ShardId shardId, java.lang.String type, java.lang.String id, long seqNo, long primaryTerm, long version, boolean created)
  • Method Details

    • status

      public RestStatus status()
      Description copied from class: DocWriteResponse
      returns the rest status for this response (based on ReplicationResponse.ShardInfo.status()
      Specified by:
      status in interface StatusToXContentObject
      Overrides:
      status in class DocWriteResponse
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • fromXContent

      public static IndexResponse fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException
      Throws:
      java.io.IOException
    • parseXContentFields

      public static void parseXContentFields​(org.elasticsearch.common.xcontent.XContentParser parser, IndexResponse.Builder context) throws java.io.IOException
      Parse the current token and update the parsing context appropriately.
      Throws:
      java.io.IOException