Class QueryValidationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
org.elasticsearch.common.ValidationException
org.elasticsearch.index.query.QueryValidationException
All Implemented Interfaces:
java.io.Serializable

public class QueryValidationException
extends ValidationException
This exception can be used to indicate various reasons why validation of a query has failed.
See Also:
Serialized Form
  • Constructor Details

  • Method Details

    • addValidationError

      public static QueryValidationException addValidationError​(java.lang.String queryId, java.lang.String validationError, QueryValidationException validationException)
      Helper method than can be used to add error messages to an existing QueryValidationException. When passing null as the initial exception, a new exception is created.
      Parameters:
      queryId - the query that caused the error
      validationError - the error message to add to an initial exception
      validationException - an initial exception. Can be null, in which case a new exception is created.
      Returns:
      a QueryValidationException with added validation error message
    • addValidationErrors

      public static QueryValidationException addValidationErrors​(java.util.List<java.lang.String> validationErrors, QueryValidationException validationException)
      Helper method than can be used to add error messages to an existing QueryValidationException. When passing null as the initial exception, a new exception is created.
      Parameters:
      validationErrors - the error messages to add to an initial exception
      validationException - an initial exception. Can be null, in which case a new exception is created.
      Returns:
      a QueryValidationException with added validation error message