Interface ErrorOnUnknown


public interface ErrorOnUnknown
Extension point to customize the error message for unknown fields. We expect Elasticsearch to plug a fancy implementation that uses Lucene's spelling correction infrastructure to suggest corrections.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static ErrorOnUnknown IMPLEMENTATION
    The implementation of this interface that was loaded from SPI.
  • Method Summary

    Modifier and Type Method Description
    java.lang.String errorMessage​(java.lang.String parserName, java.lang.String unknownField, java.lang.Iterable<java.lang.String> candidates)
    Build the error message to use when ObjectParser encounters an unknown field.
    static ErrorOnUnknown findImplementation()  
    int priority()
    Priority that this error message handler should be used.
  • Field Details

  • Method Details

    • errorMessage

      java.lang.String errorMessage​(java.lang.String parserName, java.lang.String unknownField, java.lang.Iterable<java.lang.String> candidates)
      Build the error message to use when ObjectParser encounters an unknown field.
      Parameters:
      parserName - the name of the thing we're parsing
      unknownField - the field that we couldn't recognize
      candidates - the possible fields
    • priority

      int priority()
      Priority that this error message handler should be used.
    • findImplementation

      static ErrorOnUnknown findImplementation()