add the cause to query phase execption
This commit is contained in:
parent
1aa8e01184
commit
21a1021bdb
|
@ -85,7 +85,7 @@ public class QueryPhase implements SearchPhase {
|
|||
}
|
||||
searchContext.queryResult().topDocs(topDocs);
|
||||
} catch (Exception e) {
|
||||
throw new QueryPhaseExecutionException(searchContext);
|
||||
throw new QueryPhaseExecutionException(searchContext, e);
|
||||
}
|
||||
|
||||
facetsPhase.execute(searchContext);
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.elasticsearch.search.internal.SearchContext;
|
|||
*/
|
||||
public class QueryPhaseExecutionException extends SearchException {
|
||||
|
||||
public QueryPhaseExecutionException(SearchContext context) {
|
||||
super("Failed to execute query [" + context.query() + "], sort [" + context.sort() + "], from [" + context.from() + "], size [" + context.size() + "]");
|
||||
public QueryPhaseExecutionException(SearchContext context, Throwable cause) {
|
||||
super("Failed to execute query [" + context.query() + "], sort [" + context.sort() + "], from [" + context.from() + "], size [" + context.size() + "]", cause);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue