@@ -127,7 +127,7 @@ var _ = Describe("RediSearch commands Resp 2", Label("search"), func() {
127
127
128
128
res3 , err := client .FTSearchWithArgs (ctx , "num" , "foo" , & redis.FTSearchOptions {NoContent : true , SortBy : []redis.FTSearchSortBy {sortBy2 }, SortByWithCount : true }).Result ()
129
129
Expect (err ).NotTo (HaveOccurred ())
130
- Expect (res3 .Total ).To (BeEquivalentTo (int64 (0 )))
130
+ Expect (res3 .Total ).To (BeEquivalentTo (int64 (3 )))
131
131
132
132
})
133
133
@@ -925,15 +925,15 @@ var _ = Describe("RediSearch commands Resp 2", Label("search"), func() {
925
925
client .HSet (ctx , "c" , "v" , "aaaaabaa" )
926
926
927
927
searchOptions := & redis.FTSearchOptions {
928
- Return : []redis.FTSearchReturn {{FieldName : "__v_score" }},
929
- SortBy : []redis.FTSearchSortBy {{FieldName : "__v_score" , Asc : true }},
928
+ Return : []redis.FTSearchReturn {{FieldName : "v" }},
929
+ SortBy : []redis.FTSearchSortBy {{FieldName : "v" , Asc : true }},
930
+ Limit : 10 ,
930
931
DialectVersion : 1 ,
931
- Params : map [string ]interface {}{"vec" : "aaaaaaaa" },
932
932
}
933
- res , err := client .FTSearchWithArgs (ctx , "idx1" , "*=>[KNN 2 @v $vec] " , searchOptions ).Result ()
933
+ res , err := client .FTSearchWithArgs (ctx , "idx1" , "*" , searchOptions ).Result ()
934
934
Expect (err ).NotTo (HaveOccurred ())
935
935
Expect (res .Docs [0 ].ID ).To (BeEquivalentTo ("a" ))
936
- Expect (res .Docs [0 ].Fields ["__v_score " ]).To (BeEquivalentTo ("0 " ))
936
+ Expect (res .Docs [0 ].Fields ["v " ]).To (BeEquivalentTo ("aaaaaaaa " ))
937
937
})
938
938
939
939
It ("should FTCreate VECTOR with default dialect" , Label ("search" , "ftcreate" ), func () {
0 commit comments