mirror of https://github.com/go-redis/redis.git
Add tests case with FLOAT16 and BFLOAT16 vectors
This commit is contained in:
parent
67824ebf86
commit
c2939118bc
|
@ -1043,6 +1043,16 @@ var _ = Describe("RediSearch commands", Label("search"), func() {
|
|||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(res2.Total).To(BeEquivalentTo(int64(2)))
|
||||
})
|
||||
|
||||
It("should create search index with FLOAT16 and BFLOAT16 vectors", Label("search", "ftcreate"), 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 FTProfile Search and Aggregate", Label("search", "ftprofile"), func() {
|
||||
|
|
Loading…
Reference in New Issue