Package org.elasticsearch.index.query
Class QueryValidationException
org.elasticsearch.common.ValidationException
org.elasticsearch.index.query.QueryValidationException
- All Implemented Interfaces:
This exception can be used to indicate various reasons why validation of a query has failed.
- See Also:
- Serialized Form
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic QueryValidationException
queryId, validationError, QueryValidationException validationException)
Helper method than can be used to add error messages to an existingQueryValidationException
.static QueryValidationException
<> validationErrors, QueryValidationException validationException)
Helper method than can be used to add error messages to an existingQueryValidationException
.Methods inherited from class org.elasticsearch.common.ValidationException
addValidationError, addValidationErrors, getMessage, validationErrors
Methods inherited from class java.lang.
, , , , , , , , , , ,
Methods inherited from class java.lang.
, , , , , , , , ,
-
Constructor Details
-
QueryValidationException
public QueryValidationException()
-
-
Method Details
-
addValidationError
public static queryId, validationError, QueryValidationException validationException)Helper method than can be used to add error messages to an existingQueryValidationException
. When passingnull
as the initial exception, a new exception is created.- Parameters:
queryId
- the query that caused the errorvalidationError
- the error message to add to an initial exceptionvalidationException
- an initial exception. Can benull
, in which case a new exception is created.- Returns:
- a
QueryValidationException
with added validation error message
-
addValidationErrors
public static <> validationErrors, QueryValidationException validationException)Helper method than can be used to add error messages to an existingQueryValidationException
. When passingnull
as the initial exception, a new exception is created.- Parameters:
validationErrors
- the error messages to add to an initial exceptionvalidationException
- an initial exception. Can benull
, in which case a new exception is created.- Returns:
- a
QueryValidationException
with added validation error message
-