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.ExceptiongetFailure()java.lang.StringgetFailureMessage()The actual failure message, null if its not a failure.SearchResponsegetResponse()The actual search response, null if its a failure.booleanisFailure()Is it a failed search?voidreadFrom(StreamInput in)Set this object's fields from a StreamInput.static MultiSearchResponse.ItemreadItem(StreamInput in)voidwriteTo(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:StreamableSet this object's fields from a StreamInput.- Specified by:
readFromin interfaceStreamable- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:StreamableWrite this object's fields to a StreamOutput.- Specified by:
writeToin interfaceStreamable- Throws:
java.io.IOException
-
getFailure
public java.lang.Exception getFailure()
-
-