Skip to content

Commit bdfea1c

Browse files
committed
fix feature check
1 parent a493a90 commit bdfea1c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/DenseVectorMappingUpdateIT.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
*/
3333
public class DenseVectorMappingUpdateIT extends AbstractRollingUpgradeTestCase {
3434

35+
private static final String SYNTHETIC_SOURCE_FEATURE = "gte_v8.12.0";
36+
3537
private static final String BULK1 = """
3638
{"index": {"_id": "1"}}
3739
{"embedding": [1, 1, 1, 1]}
@@ -87,7 +89,8 @@ public void testDenseVectorMappingUpdateOnOldCluster() throws IOException {
8789
String indexName = "test_index";
8890
if (isOldCluster()) {
8991
Request createIndex = new Request("PUT", "/" + indexName);
90-
boolean useSyntheticSource = randomBoolean() && getOldClusterTestVersion().after(Version.V_8_12_0.toString());
92+
boolean useSyntheticSource = randomBoolean() && oldClusterHasFeature(SYNTHETIC_SOURCE_FEATURE);
93+
9194
boolean useIndexSetting = SourceFieldMapper.onOrAfterDeprecateModeVersion(getOldClusterIndexVersion());
9295
XContentBuilder payload = XContentBuilder.builder(XContentType.JSON.xContent()).startObject();
9396
if (useSyntheticSource) {

0 commit comments

Comments
 (0)