Class ExplainResponse

All Implemented Interfaces:
Writeable, StatusToXContentObject, org.elasticsearch.core.RefCounted, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public class ExplainResponse extends ActionResponse implements StatusToXContentObject
Response containing the score explanation.
  • Constructor Details

    • ExplainResponse

      public ExplainResponse(String index, String type, String id, boolean exists)
    • ExplainResponse

      public ExplainResponse(String index, String type, String id, boolean exists, org.apache.lucene.search.Explanation explanation)
    • ExplainResponse

      public ExplainResponse(String index, String type, String id, boolean exists, org.apache.lucene.search.Explanation explanation, GetResult getResult)
    • ExplainResponse

      public ExplainResponse(StreamInput in) throws IOException
      Throws:
      IOException
  • Method Details

    • getIndex

      public String getIndex()
    • getType

      @Deprecated public String getType()
      Deprecated.
      Types are in the process of being removed.
    • getId

      public String getId()
    • getExplanation

      public org.apache.lucene.search.Explanation getExplanation()
    • isMatch

      public boolean isMatch()
    • hasExplanation

      public boolean hasExplanation()
    • isExists

      public boolean isExists()
    • getGetResult

      public GetResult getGetResult()
    • status

      public RestStatus status()
      Description copied from interface: StatusToXContentObject
      Returns the REST status to make sure it is returned correctly
      Specified by:
      status in interface StatusToXContentObject
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • fromXContent

      public static ExplainResponse fromXContent(org.elasticsearch.xcontent.XContentParser parser, boolean exists)
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object