File tree Expand file tree Collapse 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 Expand file tree Collapse file tree 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) {
140140 public static final IndexVersion ADD_RESCORE_PARAMS_TO_QUANTIZED_VECTORS_BACKPORT_8_X = def (8_528_0_00 , Version .LUCENE_9_12_1 );
141141 public static final IndexVersion RESCORE_PARAMS_ALLOW_ZERO_TO_QUANTIZED_VECTORS_BACKPORT_8_X = def (8_529_0_00 , Version .LUCENE_9_12_1 );
142142 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 );
143144 public static final IndexVersion UPGRADE_TO_LUCENE_10_0_0 = def (9_000_0_00 , Version .LUCENE_10_0_0 );
144145 public static final IndexVersion LOGSDB_DEFAULT_IGNORE_DYNAMIC_BEYOND_LIMIT = def (9_001_0_00 , Version .LUCENE_10_0_0 );
145146 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 3232import org .elasticsearch .features .NodeFeature ;
3333import org .elasticsearch .index .IndexSettings ;
3434import org .elasticsearch .index .IndexVersion ;
35+ import org .elasticsearch .index .IndexVersions ;
3536import org .elasticsearch .index .fielddata .FieldDataContext ;
3637import org .elasticsearch .index .fielddata .IndexFieldData ;
3738import org .elasticsearch .index .mapper .BlockLoader ;
9899import java .util .function .Supplier ;
99100
100101import 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 ;
101103import static org .elasticsearch .inference .TaskType .SPARSE_EMBEDDING ;
102104import static org .elasticsearch .inference .TaskType .TEXT_EMBEDDING ;
103105import static org .elasticsearch .search .SearchService .DEFAULT_SIZE ;
@@ -1077,7 +1079,8 @@ private static Mapper.Builder createEmbeddingsField(
10771079 denseVectorMapperBuilder .elementType (modelSettings .elementType ());
10781080
10791081 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 )) {
10811084 defaultIndexOptions = defaultSemanticDenseIndexOptions ();
10821085 }
10831086 if (defaultIndexOptions != null
You can’t perform that action at this time.
0 commit comments