java.lang.Object
org.elasticsearch.index.mapper.MappingParserContext
Holds everything that is needed to parse mappings. This is carried around while parsing mappings whether that
be from a dynamic template or from index mappings themselves.
-
Constructor Summary
ConstructorsConstructorDescriptionMappingParserContext
(Function<String, SimilarityProvider> similarityLookupService, Function<String, Mapper.TypeParser> typeParsers, Function<String, RuntimeField.Parser> runtimeFieldParsers, Version indexVersionCreated, Supplier<SearchExecutionContext> searchExecutionContextSupplier, DateFormatter dateFormatter, ScriptCompiler scriptCompiler, IndexAnalyzers indexAnalyzers, IndexSettings indexSettings, IdFieldMapper idFieldMapper) -
Method Summary
Modifier and TypeMethodDescriptionGets an optional default date format for date fields that do not have an explicit format setgetSimilarity
(String name) boolean
true if this pars context is coming from parsing dynamic template mappingsboolean
runtimeFieldParser
(String type) The ScriptCompiler to compile scripts needed by the Mapper.typeParser
(String type)
-
Constructor Details
-
MappingParserContext
public MappingParserContext(Function<String, SimilarityProvider> similarityLookupService, Function<String, Mapper.TypeParser> typeParsers, Function<String, RuntimeField.Parser> runtimeFieldParsers, Version indexVersionCreated, Supplier<SearchExecutionContext> searchExecutionContextSupplier, DateFormatter dateFormatter, ScriptCompiler scriptCompiler, IndexAnalyzers indexAnalyzers, IndexSettings indexSettings, IdFieldMapper idFieldMapper)
-
-
Method Details
-
getIndexAnalyzers
-
getIndexSettings
-
idFieldMapper
-
getSettings
-
getSimilarity
-
typeParser
-
runtimeFieldParser
-
indexVersionCreated
-
searchExecutionContext
-
getDateFormatter
Gets an optional default date format for date fields that do not have an explicit format setIf
null
, then date fields will default toDateFieldMapper.DEFAULT_DATE_TIME_FORMATTER
. -
isWithinMultiField
public boolean isWithinMultiField() -
isFromDynamicTemplate
public boolean isFromDynamicTemplate()true if this pars context is coming from parsing dynamic template mappings -
scriptCompiler
The ScriptCompiler to compile scripts needed by the Mapper.
-