Module org.elasticsearch.server
Package org.elasticsearch.index.mapper
Class InferenceMetadataFieldsMapper
java.lang.Object
org.elasticsearch.index.mapper.Mapper
org.elasticsearch.index.mapper.FieldMapper
org.elasticsearch.index.mapper.MetadataFieldMapper
org.elasticsearch.index.mapper.InferenceMetadataFieldsMapper
- All Implemented Interfaces:
Iterable<Mapper>,ToXContent,ToXContentFragment
An abstract
MetadataFieldMapper used as a placeholder for implementation
in the inference module. It is required by SourceFieldMapper to identify
the field name for removal from _source.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from class org.elasticsearch.index.mapper.MetadataFieldMapper
MetadataFieldMapper.Builder, MetadataFieldMapper.ConfigurableTypeParser, MetadataFieldMapper.FixedTypeParser, MetadataFieldMapper.TypeParserNested classes/interfaces inherited from class org.elasticsearch.index.mapper.FieldMapper
FieldMapper.BuilderParams, FieldMapper.Conflicts, FieldMapper.CopyTo, FieldMapper.DimensionBuilder, FieldMapper.MergeValidator<T>, FieldMapper.MultiFields, FieldMapper.Parameter<T>, FieldMapper.Serializer<T>, FieldMapper.SerializerCheck<T>, FieldMapper.SyntheticSourceMode, FieldMapper.SyntheticSourceSupportNested classes/interfaces inherited from class org.elasticsearch.index.mapper.Mapper
Mapper.SourceKeepModeNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringInternal index setting to control the format used for semantic text fields.Fields inherited from class org.elasticsearch.index.mapper.FieldMapper
builderParams, COERCE_SETTING, deprecationLogger, IGNORE_MALFORMED_SETTING, mappedFieldTypeFields inherited from class org.elasticsearch.index.mapper.Mapper
SYNTHETIC_SOURCE_KEEP_FEATURE, SYNTHETIC_SOURCE_KEEP_INDEX_SETTING, SYNTHETIC_SOURCE_KEEP_PARAMFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInferenceMetadataFieldsMapper(MappedFieldType inferenceFieldType) -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringstatic booleanChecks if theInferenceMetadataFieldsMapperis enabled for the givenSettings.static booleanisEnabled(MappingLookup mappingLookup) Checks if theInferenceMetadataFieldsMapperis enabled based on the providedMapping.Methods inherited from class org.elasticsearch.index.mapper.MetadataFieldMapper
getMergeBuilder, parseCreateField, postParse, preParse, syntheticSourceSupport, toXContent, updateableBoolParamMethods inherited from class org.elasticsearch.index.mapper.FieldMapper
checkIncomingMergeType, copyTo, doParseMultiFields, doValidate, doXContentBody, executeScript, fullPath, getTotalFieldsCount, hasScript, ignoreMalformed, indexAnalyzers, indexScriptValues, iterator, merge, multiFields, multiFieldsIterator, notFromDynamicTemplates, notInMultiFields, parse, parsesArrayValue, sourceKeepMode, sourcePathUsedBy, supportsParsingObject, syntheticFieldLoader, throwIndexingWithScriptParam, typeName, validateMethods inherited from class org.elasticsearch.index.mapper.Mapper
freezeAndDeduplicateFieldType, getOffsetFieldName, internFieldName, leafName, supportStoringArrayOffsets, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
USE_LEGACY_SEMANTIC_TEXT_FORMAT
Internal index setting to control the format used for semantic text fields. Determines whether to use the legacy format (default: true). This setting is immutable and can only be defined at index creation to ensure the internal format remains consistent throughout the index's lifecycle. -
NAME
- See Also:
-
CONTENT_TYPE
- See Also:
-
-
Constructor Details
-
InferenceMetadataFieldsMapper
-
-
Method Details
-
contentType
- Specified by:
contentTypein classFieldMapper
-
fieldType
- Overrides:
fieldTypein classFieldMapper
-
isEnabled
Checks if theInferenceMetadataFieldsMapperis enabled for the givenSettings. This indicates whether the new format for semantic text fields is active. The new format is enabled if: 1. The index version is on or afterIndexVersions.INFERENCE_METADATA_FIELDS_BACKPORT, and 2. The legacy semantic text format is disabled.- Parameters:
settings- the index settings to evaluate- Returns:
trueif the new format is enabled;falseotherwise
-
isEnabled
Checks if theInferenceMetadataFieldsMapperis enabled based on the providedMapping. This indicates whether the new format for semantic text fields is active by verifying the existence of theInferenceMetadataFieldsMapperin the mapping's metadata.- Parameters:
mappingLookup- the mapping to evaluate- Returns:
trueif theInferenceMetadataFieldsMapperis present;falseotherwise
-