public interface Warnings
Warnings returned when loading values for ESQL. These are returned as HTTP 299 headers like so:

  < Warning: 299 Elasticsearch-${ver} "No limit defined, adding default limit of [1000]"
  < Warning: 299 Elasticsearch-${ver} "Line 1:27: evaluation of [a + 1] failed, treating result as null. Only first 20 failures recorded."
  < Warning: 299 Elasticsearch-${ver} "Line 1:27: java.lang.IllegalArgumentException: single-value function encountered multi-value"
 
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    registerException(Class<? extends Exception> exceptionClass, String message)
    Register a warning.
    static void
    Register the canonical warning for when a single-value only function encounters a multivalued field.
  • Method Details

    • registerException

      void registerException(Class<? extends Exception> exceptionClass, String message)
      Register a warning. ESQL deduplicates and limits the number of warnings returned so it should be fine to blast as many warnings into this as you encounter.
      Parameters:
      exceptionClass - The class of exception. Pick the same exception you'd use if you were throwing it back over HTTP.
      message - The message to the called. ESQL's warnings machinery attaches the location in the original query and the text so there isn't any need to describe the function in this message.
    • registerSingleValueWarning

      static void registerSingleValueWarning(Warnings warnings)
      Register the canonical warning for when a single-value only function encounters a multivalued field.