org.elasticsearch.action.search
Class ShardSearchFailure

java.lang.Object
  extended by org.elasticsearch.action.search.ShardSearchFailure
All Implemented Interfaces:
Serializable, ShardOperationFailedException, Streamable

public class ShardSearchFailure
extends Object
implements ShardOperationFailedException

Represents a failure to search on a specific shard.

See Also:
Serialized Form

Field Summary
static ShardSearchFailure[] EMPTY_ARRAY
           
 
Constructor Summary
ShardSearchFailure(String reason, SearchShardTarget shardTarget)
           
ShardSearchFailure(Throwable t)
           
 
Method Summary
 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()
           
 String toString()
           
 void writeTo(StreamOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_ARRAY

public static final ShardSearchFailure[] EMPTY_ARRAY
Constructor Detail

ShardSearchFailure

public ShardSearchFailure(Throwable t)

ShardSearchFailure

public ShardSearchFailure(String reason,
                          SearchShardTarget shardTarget)
Method Detail

shard

@Nullable
public SearchShardTarget shard()
The search shard target the failure occurred on.


status

public RestStatus status()

index

public String index()
The index the search failed on.

Specified by:
index in interface ShardOperationFailedException

shardId

public int shardId()
The shard id the search failed on.

Specified by:
shardId in interface ShardOperationFailedException

reason

public String reason()
The reason of the failure.

Specified by:
reason in interface ShardOperationFailedException

toString

public String toString()
Overrides:
toString in class Object

readShardSearchFailure

public static ShardSearchFailure readShardSearchFailure(StreamInput in)
                                                 throws IOException
Throws:
IOException

readFrom

public void readFrom(StreamInput in)
              throws IOException
Specified by:
readFrom in interface Streamable
Throws:
IOException

writeTo

public void writeTo(StreamOutput out)
             throws IOException
Specified by:
writeTo in interface Streamable
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.