Package org.opensearch.common.xcontent
Interface ErrorOnUnknown
-
public interface ErrorOnUnknownExtension point to customize the error message for unknown fields. We expect OpenSearch to plug a fancy implementation that uses Lucene's spelling correction infrastructure to suggest corrections.
-
-
Field Summary
Fields Modifier and Type Field Description static ErrorOnUnknownIMPLEMENTATIONThe implementation of this interface that was loaded from SPI.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringerrorMessage(java.lang.String parserName, java.lang.String unknownField, java.lang.Iterable<java.lang.String> candidates)Build the error message to use whenObjectParserencounters an unknown field.static ErrorOnUnknownfindImplementation()intpriority()Priority that this error message handler should be used.
-
-
-
Field Detail
-
IMPLEMENTATION
static final ErrorOnUnknown IMPLEMENTATION
The implementation of this interface that was loaded from SPI.
-
-
Method Detail
-
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 whenObjectParserencounters an unknown field.- Parameters:
parserName- the name of the thing we're parsingunknownField- the field that we couldn't recognizecandidates- the possible fields
-
priority
int priority()
Priority that this error message handler should be used.
-
findImplementation
static ErrorOnUnknown findImplementation()
-
-