Skip to content

Commit f9127eb

Browse files
committed
Happy path early index validation works now; edge cases surrounding default BBQ remain
1 parent 1d524b2 commit f9127eb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,7 +1640,7 @@ public boolean supportsDimension(int dims) {
16401640
},
16411641
BBQ_IVF("bbq_ivf", true) {
16421642
@Override
1643-
public IndexOptions parseIndexOptions(String fieldName, Map<String, ?> indexOptionsMap, IndexVersion indexVersion) {
1643+
public DenseVectorIndexOptions parseIndexOptions(String fieldName, Map<String, ?> indexOptionsMap, IndexVersion indexVersion) {
16441644
Object clusterSizeNode = indexOptionsMap.remove("cluster_size");
16451645
int clusterSize = IVFVectorsFormat.DEFAULT_VECTORS_PER_CLUSTER;
16461646
if (clusterSizeNode != null) {
@@ -1685,7 +1685,7 @@ public boolean supportsDimension(int dims) {
16851685
}
16861686
};
16871687

1688-
static Optional<VectorIndexType> fromString(String type) {
1688+
public static Optional<VectorIndexType> fromString(String type) {
16891689
return Stream.of(VectorIndexType.values())
16901690
.filter(vectorIndexType -> vectorIndexType != VectorIndexType.BBQ_IVF || IVF_FORMAT.isEnabled())
16911691
.filter(vectorIndexType -> vectorIndexType.name.equals(type))

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/mapper/SemanticTextFieldMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ public SemanticTextFieldMapper build(MapperBuilderContext context) {
334334
validateServiceSettings(modelSettings.get(), resolvedModelSettings);
335335
}
336336

337-
if (indexOptions.get() != null) {
337+
if (context.getMergeReason() != MapperService.MergeReason.MAPPING_RECOVERY && indexOptions.get() != null) {
338338
validateIndexOptions(indexOptions.get(), inferenceId.getValue(), resolvedModelSettings);
339339
}
340340
final String fullName = context.buildFullName(leafName());

0 commit comments

Comments
 (0)