Skip to content

Commit

Permalink
Support FLOAT16 and BFLOAT16 VecSim storage types (#3849)
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 committed Jul 11, 2024
1 parent e185be2 commit 903cd76
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,28 @@ public void vectorFieldParams() {
// throws Field `NOINDEX` does not have a type
}

@Test
public void float16StorageType() {
assertOK(client.ftCreate(index,
VectorField.builder().fieldName("v")
.algorithm(VectorField.VectorAlgorithm.HNSW)
.addAttribute("TYPE", "FLOAT16")
.addAttribute("DIM", 4)
.addAttribute("DISTANCE_METRIC", "L2")
.build()));
}

@Test
public void bfloat16StorageType() {
assertOK(client.ftCreate(index,
VectorField.builder().fieldName("v")
.algorithm(VectorField.VectorAlgorithm.HNSW)
.addAttribute("TYPE", "BFLOAT16")
.addAttribute("DIM", 4)
.addAttribute("DISTANCE_METRIC", "L2")
.build()));
}

@Test
public void searchProfile() {
assertOK(client.ftCreate(index, TextField.of("t1"), TextField.of("t2")));
Expand Down

0 comments on commit 903cd76

Please sign in to comment.