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 class
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.MetadataFieldMapper
MetadataFieldMapper.Builder, MetadataFieldMapper.ConfigurableTypeParser, MetadataFieldMapper.FixedTypeParser, MetadataFieldMapper.TypeParser
Nested 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.SyntheticSourceSupport
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.Mapper
Mapper.SourceKeepMode
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
Internal 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, mappedFieldType
Fields inherited from class org.elasticsearch.index.mapper.Mapper
SYNTHETIC_SOURCE_KEEP_FEATURE, SYNTHETIC_SOURCE_KEEP_INDEX_SETTING, SYNTHETIC_SOURCE_KEEP_PARAM
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
InferenceMetadataFieldsMapper
(MappedFieldType inferenceFieldType) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
static boolean
Checks if theInferenceMetadataFieldsMapper
is enabled for the givenSettings
.static boolean
isEnabled
(MappingLookup mappingLookup) Checks if theInferenceMetadataFieldsMapper
is enabled based on the providedMapping
.Methods inherited from class org.elasticsearch.index.mapper.MetadataFieldMapper
getMergeBuilder, parseCreateField, postParse, preParse, syntheticSourceSupport, toXContent, updateableBoolParam
Methods inherited from class org.elasticsearch.index.mapper.FieldMapper
checkIncomingMergeType, copyTo, doValidate, doXContentBody, executeScript, fullPath, getTotalFieldsCount, hasScript, ignoreMalformed, indexAnalyzers, indexScriptValues, iterator, merge, multiFields, multiFieldsIterator, notFromDynamicTemplates, notInMultiFields, parse, parsesArrayValue, sourceKeepMode, sourcePathUsedBy, supportsParsingObject, syntheticFieldLoader, typeName, validate
Methods inherited from class org.elasticsearch.index.mapper.Mapper
freezeAndDeduplicateFieldType, internFieldName, leafName, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods 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:
contentType
in classFieldMapper
-
fieldType
- Overrides:
fieldType
in classFieldMapper
-
isEnabled
Checks if theInferenceMetadataFieldsMapper
is 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:
true
if the new format is enabled;false
otherwise
-
isEnabled
Checks if theInferenceMetadataFieldsMapper
is enabled based on the providedMapping
. This indicates whether the new format for semantic text fields is active by verifying the existence of theInferenceMetadataFieldsMapper
in the mapping's metadata.- Parameters:
mappingLookup
- the mapping to evaluate- Returns:
true
if theInferenceMetadataFieldsMapper
is present;false
otherwise
-