From 3613df6115220a276599764b54baec9dfc9d1072 Mon Sep 17 00:00:00 2001 From: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com> Date: Wed, 17 Jul 2024 21:56:58 +0300 Subject: [PATCH] Add tests case with FLOAT16 and BFLOAT16 vectors (#3054) * Add tests case with FLOAT16 and BFLOAT16 vectors * Remove from enterprise --- search_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/search_test.go b/search_test.go index 0d66f243f..0e1a473b8 100644 --- a/search_test.go +++ b/search_test.go @@ -1148,6 +1148,16 @@ var _ = Describe("RediSearch commands", Label("search"), func() { Expect(res2.Total).To(BeEquivalentTo(int64(2))) }) + It("should create search index with FLOAT16 and BFLOAT16 vectors", Label("search", "ftcreate", "NonRedisEnterprise"), func() { + val, err := client.FTCreate(ctx, "index", &redis.FTCreateOptions{}, + &redis.FieldSchema{FieldName: "float16", FieldType: redis.SearchFieldTypeVector, VectorArgs: &redis.FTVectorArgs{FlatOptions: &redis.FTFlatOptions{Type: "FLOAT16", Dim: 768, DistanceMetric: "COSINE"}}}, + &redis.FieldSchema{FieldName: "bfloat16", FieldType: redis.SearchFieldTypeVector, VectorArgs: &redis.FTVectorArgs{FlatOptions: &redis.FTFlatOptions{Type: "BFLOAT16", Dim: 768, DistanceMetric: "COSINE"}}}, + ).Result() + Expect(err).NotTo(HaveOccurred()) + Expect(val).To(BeEquivalentTo("OK")) + WaitForIndexing(client, "index") + }) + It("should test geoshapes query intersects and disjoint", Label("NonRedisEnterprise"), func() { _, err := client.FTCreate(ctx, "idx1", &redis.FTCreateOptions{}, &redis.FieldSchema{ FieldName: "g",