Class SearchTimeoutException

All Implemented Interfaces:
Serializable, Writeable, ElasticsearchWrapperException, ToXContent, ToXContentFragment

public class SearchTimeoutException extends SearchException
Specific instance of SearchException that indicates that a search timeout occurred. Always returns http status 504 (Gateway Timeout)
See Also:
  • Constructor Details

  • Method Details

    • status

      public RestStatus status()
      Description copied from class: ElasticsearchException
      Returns the rest status code associated with this exception.
      Overrides:
      status in class ElasticsearchException
    • handleTimeout

      public static void handleTimeout(boolean allowPartialSearchResults, SearchShardTarget target, QuerySearchResult querySearchResult)
      Propagate a timeout according to whether partial search results are allowed or not. In case partial results are allowed, a flag will be set to the provided QuerySearchResult to indicate that there was a timeout, but the execution will continue and partial results will be returned to the user. When partial results are disallowed, a SearchTimeoutException will be thrown and returned to the user.