Skip to content

Commit 5277ed0

Browse files
committed
Support FLOAT16 and BFLOAT16 VecSim storage types (#3849)
1 parent 856804a commit 5277ed0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/test/java/redis/clients/jedis/modules/search/SearchWithParamsTest.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,28 @@ public void vectorFieldParams() {
11771177
// throws Field `NOINDEX` does not have a type
11781178
}
11791179

1180+
@Test
1181+
public void float16StorageType() {
1182+
assertOK(client.ftCreate(index,
1183+
VectorField.builder().fieldName("v")
1184+
.algorithm(VectorField.VectorAlgorithm.HNSW)
1185+
.addAttribute("TYPE", "FLOAT16")
1186+
.addAttribute("DIM", 4)
1187+
.addAttribute("DISTANCE_METRIC", "L2")
1188+
.build()));
1189+
}
1190+
1191+
@Test
1192+
public void bfloat16StorageType() {
1193+
assertOK(client.ftCreate(index,
1194+
VectorField.builder().fieldName("v")
1195+
.algorithm(VectorField.VectorAlgorithm.HNSW)
1196+
.addAttribute("TYPE", "BFLOAT16")
1197+
.addAttribute("DIM", 4)
1198+
.addAttribute("DISTANCE_METRIC", "L2")
1199+
.build()));
1200+
}
1201+
11801202
@Ignore
11811203
@Test
11821204
public void searchProfile() {

0 commit comments

Comments
 (0)