Skip to content

Commit a031b6c

Browse files
committed
make it possible to test with synthetic source
1 parent 4a364bf commit a031b6c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,13 @@ public void testDenseVectorMappingUpdateOnOldCluster() throws IOException {
8888
Request createIndex = new Request("PUT", "/" + indexName);
8989
XContentBuilder mappings = XContentBuilder.builder(XContentType.JSON.xContent())
9090
.startObject()
91-
.startObject("mappings")
91+
.startObject("mappings");
92+
if (randomBoolean() && getOldClusterTestVersion().after(Version.V_8_12_0.toString())) {
93+
mappings = mappings.startObject("_source");
94+
mappings.field("mode", "synthetic");
95+
mappings.endObject();
96+
}
97+
mappings = mappings
9298
.startObject("properties")
9399
.startObject("embedding")
94100
.field("type", "dense_vector")

0 commit comments

Comments
 (0)