Class SearchShardTarget

java.lang.Object
org.elasticsearch.search.SearchShardTarget
All Implemented Interfaces:
Comparable<SearchShardTarget>, Writeable

public final class SearchShardTarget extends Object implements Writeable, Comparable<SearchShardTarget>
The target that the search request was executed on.
  • Constructor Details

  • Method Details

    • getNodeId

      @Nullable public String getNodeId()
    • getNodeIdText

      public Text getNodeIdText()
    • getIndex

      public String getIndex()
    • getShardId

      public ShardId getShardId()
    • getClusterAlias

      @Nullable public String getClusterAlias()
    • getFullyQualifiedIndexName

      public String getFullyQualifiedIndexName()
      Returns the fully qualified index name, including the index prefix that indicates which cluster results come from.
    • compareTo

      public int compareTo(SearchShardTarget o)
      Specified by:
      compareTo in interface Comparable<SearchShardTarget>
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      NOTE: this representation is used as the "id" for shards for the REST response when query profiling is requested. So changing this formulation may break systems that rely on the format, including the parser in SearchProfileResults.
      Overrides:
      toString in class Object