Class SearchResponse

    • Method Detail

      • getHits

        public SearchHits getHits()
        The search hits.
      • getSuggest

        public Suggest getSuggest()
      • isTimedOut

        public boolean isTimedOut()
        Has the search operation timed out.
      • isTerminatedEarly

        public java.lang.Boolean isTerminatedEarly()
        Has the search operation terminated early due to reaching terminateAfter
      • getNumReducePhases

        public int getNumReducePhases()
        Returns the number of reduce phases applied to obtain this search response
      • getTook

        public TimeValue getTook()
        How long the search took.
      • getTotalShards

        public int getTotalShards()
        The total number of shards the search was executed on.
      • getSuccessfulShards

        public int getSuccessfulShards()
        The successful number of shards the search was executed on.
      • getSkippedShards

        public int getSkippedShards()
        The number of shards skipped due to pre-filtering
      • getFailedShards

        public int getFailedShards()
        The failed number of shards the search was executed on.
      • getShardFailures

        public ShardSearchFailure[] getShardFailures()
        The failures that occurred during the search.
      • scrollId

        public void scrollId​(java.lang.String scrollId)
      • getProfileResults

        public java.util.Map<java.lang.String,​ProfileShardResult> getProfileResults()
        If profiling was enabled, this returns an object containing the profile results from each shard. If profiling was not enabled, this will return null
        The profile results or an empty map
      • getClusters

        public SearchResponse.Clusters getClusters()
        Returns info about what clusters the search was executed against. Available only in responses obtained from a Cross Cluster Search request, otherwise null
        See Also:
      • fromXContent

        public static SearchResponse fromXContent​(XContentParser parser)
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object