Package org.elasticsearch.index.mapper
Class MappingParserContext
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
ConstructorDescriptionMappingParserContext(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, BooleanSupplier idFieldDataEnabled)
-
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.protected Function<String,SimilarityProvider>
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, BooleanSupplier idFieldDataEnabled)
-
-
Method Details
-
getIndexAnalyzers
-
getIndexSettings
-
isIdFieldDataEnabled
-
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 -
similarityLookupService
-
scriptCompiler
The ScriptCompiler to compile scripts needed by the Mapper.
-