Package org.elasticsearch.action.search
Class MultiSearchResponse.Item
- java.lang.Object
-
- org.elasticsearch.action.search.MultiSearchResponse.Item
-
- All Implemented Interfaces:
Streamable
- Enclosing class:
- MultiSearchResponse
public static class MultiSearchResponse.Item extends java.lang.Object implements Streamable
A search response item, holding the actual search response, or an error message if it failed.
-
-
Constructor Summary
Constructors Constructor Description Item(SearchResponse response, java.lang.Exception exception)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Exception
getFailure()
java.lang.String
getFailureMessage()
The actual failure message, null if its not a failure.SearchResponse
getResponse()
The actual search response, null if its a failure.boolean
isFailure()
Is it a failed search?void
readFrom(StreamInput in)
Set this object's fields from a StreamInput.static MultiSearchResponse.Item
readItem(StreamInput in)
void
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
-
-
-
Constructor Detail
-
Item
public Item(SearchResponse response, java.lang.Exception exception)
-
-
Method Detail
-
isFailure
public boolean isFailure()
Is it a failed search?
-
getFailureMessage
@Nullable public java.lang.String getFailureMessage()
The actual failure message, null if its not a failure.
-
getResponse
@Nullable public SearchResponse getResponse()
The actual search response, null if its a failure.
-
readItem
public static MultiSearchResponse.Item readItem(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:Streamable
Set this object's fields from a StreamInput.- Specified by:
readFrom
in interfaceStreamable
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write this object's fields to a StreamOutput.- Specified by:
writeTo
in interfaceStreamable
- Throws:
java.io.IOException
-
getFailure
public java.lang.Exception getFailure()
-
-