Package org.elasticsearch.action.search
Class SearchPhaseExecutionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.elasticsearch.ElasticsearchException
-
- org.elasticsearch.action.search.SearchPhaseExecutionException
-
- All Implemented Interfaces:
java.io.Serializable,Writeable,ToXContent,ToXContentFragment
- Direct Known Subclasses:
ReduceSearchPhaseException
public class SearchPhaseExecutionException extends ElasticsearchException
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, 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.ElasticsearchException
REST_EXCEPTION_SKIP_STACK_TRACE, REST_EXCEPTION_SKIP_STACK_TRACE_DEFAULT
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description SearchPhaseExecutionException(java.lang.String phaseName, java.lang.String msg, java.lang.Throwable cause, ShardSearchFailure[] shardFailures)SearchPhaseExecutionException(java.lang.String phaseName, java.lang.String msg, ShardSearchFailure[] shardFailures)SearchPhaseExecutionException(StreamInput in)
-
Method Summary
Modifier and Type Method Description java.lang.ThrowablegetCause()java.lang.StringgetPhaseName()ElasticsearchException[]guessRootCauses()Returns the root cause of this exception or multiple if different shards caused different exceptionsprotected voidmetadataToXContent(XContentBuilder builder, ToXContent.Params params)Renders additional per exception information into the XContentShardSearchFailure[]shardFailures()RestStatusstatus()Returns the rest status code associated with this exception.java.lang.StringtoString()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)voidwriteTo(StreamOutput out)Write this into the StreamOutput.-
Methods inherited from class org.elasticsearch.ElasticsearchException
addHeader, addHeader, addMetadata, addMetadata, failureFromXContent, fromXContent, generateFailureXContent, generateThrowableXContent, getDetailedMessage, getExceptionName, getExceptionName, getHeader, getHeaderKeys, getHeaders, getId, getIndex, getMetadata, getMetadata, getMetadataKeys, getResourceId, getResourceType, getRootCause, getShardId, guessRootCauses, innerFromXContent, innerToXContent, isRegistered, readException, readStackTrace, setIndex, setIndex, setResources, setShard, unwrapCause, writeStackTraces
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
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.ToXContentFragment
isFragment
-
-
-
-
Constructor Detail
-
SearchPhaseExecutionException
public SearchPhaseExecutionException(java.lang.String phaseName, java.lang.String msg, ShardSearchFailure[] shardFailures)
-
SearchPhaseExecutionException
public SearchPhaseExecutionException(java.lang.String phaseName, java.lang.String msg, java.lang.Throwable cause, ShardSearchFailure[] shardFailures)
-
SearchPhaseExecutionException
public SearchPhaseExecutionException(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classElasticsearchException- Throws:
java.io.IOException
-
status
public RestStatus status()
Description copied from class:ElasticsearchExceptionReturns the rest status code associated with this exception.- Overrides:
statusin classElasticsearchException
-
shardFailures
public ShardSearchFailure[] shardFailures()
-
getCause
public java.lang.Throwable getCause()
- Overrides:
getCausein classjava.lang.Throwable
-
metadataToXContent
protected void metadataToXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
Description copied from class:ElasticsearchExceptionRenders additional per exception information into the XContent- Overrides:
metadataToXContentin classElasticsearchException- Throws:
java.io.IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContentin interfaceToXContent- Overrides:
toXContentin classElasticsearchException- Throws:
java.io.IOException
-
guessRootCauses
public ElasticsearchException[] guessRootCauses()
Description copied from class:ElasticsearchExceptionReturns the root cause of this exception or multiple if different shards caused different exceptions- Overrides:
guessRootCausesin classElasticsearchException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classElasticsearchException
-
getPhaseName
public java.lang.String getPhaseName()
-
-