Skip to content

Commit

Permalink
Add tests case with FLOAT16 and BFLOAT16 vectors (#3054)
Browse files Browse the repository at this point in the history
* Add tests case with FLOAT16 and BFLOAT16 vectors

* Remove from enterprise
  • Loading branch information
ofekshenawa committed Jul 17, 2024
1 parent 46d2452 commit 3613df6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 3613df6

Please sign in to comment.