File tree 2 files changed +5
-1
lines changed
server/src/main/java/org/elasticsearch/index
x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/mapper
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ private static Version parseUnchecked(String version) {
140
140
public static final IndexVersion ADD_RESCORE_PARAMS_TO_QUANTIZED_VECTORS_BACKPORT_8_X = def (8_528_0_00 , Version .LUCENE_9_12_1 );
141
141
public static final IndexVersion RESCORE_PARAMS_ALLOW_ZERO_TO_QUANTIZED_VECTORS_BACKPORT_8_X = def (8_529_0_00 , Version .LUCENE_9_12_1 );
142
142
public static final IndexVersion DEFAULT_OVERSAMPLE_VALUE_FOR_BBQ_BACKPORT_8_X = def (8_530_0_00 , Version .LUCENE_9_12_1 );
143
+ public static final IndexVersion SEMANTIC_TEXT_DEFAULTS_TO_BBQ_BACKPORT_8_X = def (8_531_0_00 , Version .LUCENE_9_12_1 );
143
144
public static final IndexVersion UPGRADE_TO_LUCENE_10_0_0 = def (9_000_0_00 , Version .LUCENE_10_0_0 );
144
145
public static final IndexVersion LOGSDB_DEFAULT_IGNORE_DYNAMIC_BEYOND_LIMIT = def (9_001_0_00 , Version .LUCENE_10_0_0 );
145
146
public static final IndexVersion TIME_BASED_K_ORDERED_DOC_ID = def (9_002_0_00 , Version .LUCENE_10_0_0 );
Original file line number Diff line number Diff line change 32
32
import org .elasticsearch .features .NodeFeature ;
33
33
import org .elasticsearch .index .IndexSettings ;
34
34
import org .elasticsearch .index .IndexVersion ;
35
+ import org .elasticsearch .index .IndexVersions ;
35
36
import org .elasticsearch .index .fielddata .FieldDataContext ;
36
37
import org .elasticsearch .index .fielddata .IndexFieldData ;
37
38
import org .elasticsearch .index .mapper .BlockLoader ;
98
99
import java .util .function .Supplier ;
99
100
100
101
import static org .elasticsearch .index .IndexVersions .SEMANTIC_TEXT_DEFAULTS_TO_BBQ ;
102
+ import static org .elasticsearch .index .IndexVersions .SEMANTIC_TEXT_DEFAULTS_TO_BBQ_BACKPORT_8_X ;
101
103
import static org .elasticsearch .inference .TaskType .SPARSE_EMBEDDING ;
102
104
import static org .elasticsearch .inference .TaskType .TEXT_EMBEDDING ;
103
105
import static org .elasticsearch .search .SearchService .DEFAULT_SIZE ;
@@ -1077,7 +1079,8 @@ private static Mapper.Builder createEmbeddingsField(
1077
1079
denseVectorMapperBuilder .elementType (modelSettings .elementType ());
1078
1080
1079
1081
DenseVectorFieldMapper .IndexOptions defaultIndexOptions = null ;
1080
- if (indexVersionCreated .onOrAfter (SEMANTIC_TEXT_DEFAULTS_TO_BBQ )) {
1082
+ if (indexVersionCreated .onOrAfter (SEMANTIC_TEXT_DEFAULTS_TO_BBQ )
1083
+ || indexVersionCreated .between (SEMANTIC_TEXT_DEFAULTS_TO_BBQ_BACKPORT_8_X , IndexVersions .UPGRADE_TO_LUCENE_10_0_0 )) {
1081
1084
defaultIndexOptions = defaultSemanticDenseIndexOptions ();
1082
1085
}
1083
1086
if (defaultIndexOptions != null
You can’t perform that action at this time.
0 commit comments