Skip to content

Commit

Permalink
iter
Browse files Browse the repository at this point in the history
  • Loading branch information
javanna committed Feb 6, 2024
1 parent 4e7a1aa commit 99d5ac9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,11 @@ public QueryPhaseExecutionException(SearchShardTarget shardTarget, String msg, T
super(shardTarget, "Query Failed [" + msg + "]", cause);
}

/**
* Creates a new instance of {@link QueryPhaseExecutionException}. To be used for subclasses that don't make a root cause available.
* It is highly recommended to override {@link ElasticsearchException#status()} in such cases, otherwise the status code will be 500.
*/
protected QueryPhaseExecutionException(SearchShardTarget shardTarget, String msg) {
super(shardTarget, "Query Failed [" + msg + "]");
}

public QueryPhaseExecutionException(StreamInput in) throws IOException {
super(in);
}

public QueryPhaseExecutionException(SearchShardTarget shardTarget, String msg) {
super(shardTarget, "Query Failed [" + msg + "]");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@

import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.search.SearchException;
import org.elasticsearch.search.SearchShardTarget;

import java.io.IOException;

/**
* Specific instance of {@link SearchException} that indicates that a search timeout occurred.
* Specific instance of QueryPhaseExecutionException that indicates that a search timeout occurred.
* Always returns http status 504 (Gateway Timeout)
*/
public final class QueryPhaseTimeoutException extends QueryPhaseExecutionException {
public class QueryPhaseTimeoutException extends QueryPhaseExecutionException {
public QueryPhaseTimeoutException(SearchShardTarget shardTarget, String msg) {
super(shardTarget, msg);
}
Expand Down

0 comments on commit 99d5ac9

Please sign in to comment.