File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras
server/src/main/java/org/elasticsearch/index Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -165,13 +165,21 @@ public MatchOnlyTextFieldMapper build(MapperBuilderContext context) {
165165 }
166166 }
167167
168+ private static boolean isSyntheticSourceStoredFieldInBinaryFormat (IndexVersion indexCreatedVersion ) {
169+ return indexCreatedVersion .onOrAfter (IndexVersions .MATCH_ONLY_TEXT_STORED_AS_BYTES )
170+ || indexCreatedVersion .between (
171+ IndexVersions .SYNTHETIC_SOURCE_STORE_ARRAYS_NATIVELY_BACKPORT_8_X ,
172+ IndexVersions .UPGRADE_TO_LUCENE_10_0_0
173+ );
174+ }
175+
168176 public static final TypeParser PARSER = new TypeParser (
169177 (n , c ) -> new Builder (
170178 n ,
171179 c .indexVersionCreated (),
172180 c .getIndexAnalyzers (),
173181 c .isWithinMultiField (),
174- c .indexVersionCreated (). onOrAfter ( IndexVersions . MATCH_ONLY_TEXT_STORED_AS_BYTES )
182+ isSyntheticSourceStoredFieldInBinaryFormat ( c .indexVersionCreated ())
175183 )
176184 );
177185
Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ private static Version parseUnchecked(String version) {
145145 public static final IndexVersion MAPPER_TEXT_MATCH_ONLY_MULTI_FIELDS_DEFAULT_NOT_STORED_8_19 = def (8_533_0_00 , Version .LUCENE_9_12_1 );
146146 public static final IndexVersion UPGRADE_TO_LUCENE_9_12_2 = def (8_534_0_00 , Version .LUCENE_9_12_2 );
147147 public static final IndexVersion SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT_BACKPORT_8_X = def (8_535_0_00 , Version .LUCENE_9_12_2 );
148+ public static final IndexVersion MATCH_ONLY_TEXT_STORED_AS_BYTES_BACKPORT_8_X = def (8_536_0_00 , Version .LUCENE_9_12_2 );
148149 public static final IndexVersion UPGRADE_TO_LUCENE_10_0_0 = def (9_000_0_00 , Version .LUCENE_10_0_0 );
149150 public static final IndexVersion LOGSDB_DEFAULT_IGNORE_DYNAMIC_BEYOND_LIMIT = def (9_001_0_00 , Version .LUCENE_10_0_0 );
150151 public static final IndexVersion TIME_BASED_K_ORDERED_DOC_ID = def (9_002_0_00 , Version .LUCENE_10_0_0 );
You can’t perform that action at this time.
0 commit comments