Include default index option type to defaults
This commit is contained in:
parent
aac9ab7525
commit
b08e2a1d7e
|
@ -203,6 +203,7 @@ public final class IndexScopedSettings extends AbstractScopedSettings {
|
||||||
IndexSettings.INDEX_MAPPER_SOURCE_MODE_SETTING,
|
IndexSettings.INDEX_MAPPER_SOURCE_MODE_SETTING,
|
||||||
IndexSettings.RECOVERY_USE_SYNTHETIC_SOURCE_SETTING,
|
IndexSettings.RECOVERY_USE_SYNTHETIC_SOURCE_SETTING,
|
||||||
InferenceMetadataFieldsMapper.USE_LEGACY_SEMANTIC_TEXT_FORMAT,
|
InferenceMetadataFieldsMapper.USE_LEGACY_SEMANTIC_TEXT_FORMAT,
|
||||||
|
InferenceMetadataFieldsMapper.DEFAULT_SEMANTIC_TEXT_INDEX_OPTIONS,
|
||||||
|
|
||||||
// validate that built-in similarities don't get redefined
|
// validate that built-in similarities don't get redefined
|
||||||
Setting.groupSetting("index.similarity.", (s) -> {
|
Setting.groupSetting("index.similarity.", (s) -> {
|
||||||
|
|
|
@ -17,11 +17,14 @@ import org.elasticsearch.common.settings.Setting;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
import org.elasticsearch.index.IndexVersion;
|
import org.elasticsearch.index.IndexVersion;
|
||||||
import org.elasticsearch.index.IndexVersions;
|
import org.elasticsearch.index.IndexVersions;
|
||||||
|
import org.elasticsearch.index.mapper.vectors.DenseVectorFieldMapper;
|
||||||
import org.elasticsearch.index.query.SearchExecutionContext;
|
import org.elasticsearch.index.query.SearchExecutionContext;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
import static org.elasticsearch.index.mapper.vectors.DenseVectorFieldMapper.VectorIndexType.BBQ_HNSW;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An abstract {@link MetadataFieldMapper} used as a placeholder for implementation
|
* An abstract {@link MetadataFieldMapper} used as a placeholder for implementation
|
||||||
* in the inference module. It is required by {@link SourceFieldMapper} to identify
|
* in the inference module. It is required by {@link SourceFieldMapper} to identify
|
||||||
|
@ -42,6 +45,14 @@ public abstract class InferenceMetadataFieldsMapper extends MetadataFieldMapper
|
||||||
Setting.Property.InternalIndex
|
Setting.Property.InternalIndex
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public static final Setting<String> DEFAULT_SEMANTIC_TEXT_INDEX_OPTIONS = Setting.simpleString(
|
||||||
|
"index.mapping.semantic_text.default_index_options_type",
|
||||||
|
BBQ_HNSW.getName(),
|
||||||
|
Setting.Property.Final,
|
||||||
|
Setting.Property.IndexScope,
|
||||||
|
Setting.Property.InternalIndex
|
||||||
|
);
|
||||||
|
|
||||||
// Check index version SOURCE_MAPPER_MODE_ATTRIBUTE_NOOP because that index version was added in the same serverless promotion
|
// Check index version SOURCE_MAPPER_MODE_ATTRIBUTE_NOOP because that index version was added in the same serverless promotion
|
||||||
// where the new format was enabled by default
|
// where the new format was enabled by default
|
||||||
public static final IndexVersion USE_NEW_SEMANTIC_TEXT_FORMAT_BY_DEFAULT = IndexVersions.SOURCE_MAPPER_MODE_ATTRIBUTE_NOOP;
|
public static final IndexVersion USE_NEW_SEMANTIC_TEXT_FORMAT_BY_DEFAULT = IndexVersions.SOURCE_MAPPER_MODE_ATTRIBUTE_NOOP;
|
||||||
|
|
Loading…
Reference in New Issue