public class ShardSearchFailure extends Object implements ShardOperationFailedException
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static ShardSearchFailure[] |
EMPTY_ARRAY |
EMPTY_PARAMS
Constructor and Description |
---|
ShardSearchFailure(String reason,
SearchShardTarget shardTarget) |
ShardSearchFailure(String reason,
SearchShardTarget shardTarget,
RestStatus status) |
ShardSearchFailure(Throwable t) |
ShardSearchFailure(Throwable t,
SearchShardTarget shardTarget) |
Modifier and Type | Method and Description |
---|---|
Throwable |
getCause()
The cause of this failure.
|
String |
index()
The index the search failed on.
|
void |
readFrom(StreamInput in) |
static ShardSearchFailure |
readShardSearchFailure(StreamInput in) |
String |
reason()
The reason of the failure.
|
SearchShardTarget |
shard()
The search shard target the failure occurred on.
|
int |
shardId()
The shard id the search failed on.
|
RestStatus |
status()
The status of the failure.
|
String |
toString() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out) |
public static final ShardSearchFailure[] EMPTY_ARRAY
public ShardSearchFailure(Throwable t)
public ShardSearchFailure(Throwable t, @Nullable SearchShardTarget shardTarget)
public ShardSearchFailure(String reason, SearchShardTarget shardTarget)
public ShardSearchFailure(String reason, SearchShardTarget shardTarget, RestStatus status)
@Nullable public SearchShardTarget shard()
public RestStatus status()
ShardOperationFailedException
status
in interface ShardOperationFailedException
public String index()
index
in interface ShardOperationFailedException
public int shardId()
shardId
in interface ShardOperationFailedException
public String reason()
reason
in interface ShardOperationFailedException
public static ShardSearchFailure readShardSearchFailure(StreamInput in) throws IOException
IOException
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
IOException
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
IOException
public Throwable getCause()
ShardOperationFailedException
getCause
in interface ShardOperationFailedException
Copyright © 2009–2016. All rights reserved.