Package org.elasticsearch.xcontent
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
Modifier and TypeFieldDescriptionstatic final ErrorOnUnknown
The implementation of this interface that was loaded from SPI. -
Method Summary
Modifier and TypeMethodDescriptionerrorMessage
(String parserName, String unknownField, Iterable<String> candidates) Build the error message to use whenObjectParser
encounters an unknown field.static ErrorOnUnknown
int
priority()
Priority that this error message handler should be used.
-
Field Details
-
IMPLEMENTATION
The implementation of this interface that was loaded from SPI.
-
-
Method Details
-
errorMessage
Build the error message to use whenObjectParser
encounters 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
-