Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support FLOAT16 and BFLOAT16 VecSim storage types #3849

Merged
merged 3 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ start: stunnel cleanup compile-module
echo "$$REDIS_UDS" | redis-server -
echo "$$REDIS_UNAVAILABLE_CONF" | redis-server -
redis-cli -a cluster --cluster create 127.0.0.1:7479 127.0.0.1:7480 127.0.0.1:7481 --cluster-yes
docker run -p 6479:6379 --name jedis-stack -d redis/redis-stack-server:edge
docker run -p 6479:6379 --name jedis-stack -d redis/redis-stack-server:7.4.0-rc1

cleanup:
- rm -vf /tmp/redis_cluster_node*.conf 2>/dev/null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,28 @@ public void testFlatVectorSimilarity() {
assertEquals("0", doc1.get("__v_score"));
}

@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
Loading