Module org.elasticsearch.xcontent
Package org.elasticsearch.xcontent
Interface XContentParserConfiguration
public interface XContentParserConfiguration
Configuration for 
XContentParser.- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final XContentParserConfigurationCreates parsers that don't supportXContentParser.namedObject(java.lang.Class<T>, java.lang.String, java.lang.Object), throw an exception when they see deprecated fields, that return thecurrent versionfromXContentParser.getRestApiVersion(), and do no filtering.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanregistry()withDeprecationHandler(DeprecationHandler deprecationHandler) Replace the behavior ofXContentParserwhen it encounters a deprecated field.withFiltering(String prefixPath, Set<String> includeStrings, Set<String> excludeStrings, boolean filtersMatchFieldNamesWithDots) Replace the configured filtering.withFiltering(Set<String> includeStrings, Set<String> excludeStrings, boolean filtersMatchFieldNamesWithDots) withIncludeSourceOnError(boolean includeSourceOnError) Disable to not include the source in case of parsing errors (defaults to true).withRegistry(NamedXContentRegistry registry) Replace the registry backingXContentParser.namedObject(java.lang.Class<T>, java.lang.String, java.lang.Object).withRestApiVersion(RestApiVersion restApiVersion) Replace theclaimedRestApiVersion.
- 
Field Details- 
EMPTYCreates parsers that don't supportXContentParser.namedObject(java.lang.Class<T>, java.lang.String, java.lang.Object), throw an exception when they see deprecated fields, that return thecurrent versionfromXContentParser.getRestApiVersion(), and do no filtering.
 
- 
- 
Method Details- 
withIncludeSourceOnErrorDisable to not include the source in case of parsing errors (defaults to true).
- 
includeSourceOnErrorboolean includeSourceOnError()
- 
withRegistryReplace the registry backingXContentParser.namedObject(java.lang.Class<T>, java.lang.String, java.lang.Object).
- 
registryNamedXContentRegistry registry()
- 
withDeprecationHandlerReplace the behavior ofXContentParserwhen it encounters a deprecated field.
- 
deprecationHandlerDeprecationHandler deprecationHandler()
- 
withRestApiVersionReplace theclaimedRestApiVersion.
- 
restApiVersionRestApiVersion restApiVersion()
- 
withFilteringXContentParserConfiguration withFiltering(Set<String> includeStrings, Set<String> excludeStrings, boolean filtersMatchFieldNamesWithDots) 
- 
withFilteringXContentParserConfiguration withFiltering(String prefixPath, Set<String> includeStrings, Set<String> excludeStrings, boolean filtersMatchFieldNamesWithDots) Replace the configured filtering.- Parameters:
- prefixPath- The path to be prepended to each sub-path before applying the include/exclude rules. Specify- nullif parsing starts from the root.
- includeStrings- A set of strings representing paths to include during filtering. If specified, only these paths will be included in parsing.
- excludeStrings- A set of strings representing paths to exclude during filtering. If specified, these paths will be excluded from parsing.
- filtersMatchFieldNamesWithDots- Indicates whether filters should match field names containing dots ('.') as part of the field name.
 
 
-