@@ -269,6 +269,8 @@ var _ = Describe("RediSearch commands Resp 2", Label("search"), func() {
269269 Expect (err ).NotTo (HaveOccurred ())
270270 Expect (res1 .Total ).To (BeEquivalentTo (int64 (1 )))
271271
272+ _ , err = client .FTSearch (ctx , "idx_not_exist" , "only in the body" ).Result ()
273+ Expect (err ).To (HaveOccurred ())
272274 })
273275
274276 It ("should FTSpellCheck" , Label ("search" , "ftcreate" , "ftsearch" , "ftspellcheck" ), func () {
@@ -643,11 +645,25 @@ var _ = Describe("RediSearch commands Resp 2", Label("search"), func() {
643645 Expect (err ).NotTo (HaveOccurred ())
644646 Expect (res .Rows [0 ].Fields ["t2" ]).To (BeEquivalentTo ("world" ))
645647
648+ options = & redis.FTAggregateOptions {Load : []redis.FTAggregateLoad {{Field : "t2" , As : "t2alias" }}}
649+ res , err = client .FTAggregateWithArgs (ctx , "idx1" , "*" , options ).Result ()
650+ Expect (err ).NotTo (HaveOccurred ())
651+ Expect (res .Rows [0 ].Fields ["t2alias" ]).To (BeEquivalentTo ("world" ))
652+
653+ options = & redis.FTAggregateOptions {Load : []redis.FTAggregateLoad {{Field : "t1" }, {Field : "t2" , As : "t2alias" }}}
654+ res , err = client .FTAggregateWithArgs (ctx , "idx1" , "*" , options ).Result ()
655+ Expect (err ).NotTo (HaveOccurred ())
656+ Expect (res .Rows [0 ].Fields ["t1" ]).To (BeEquivalentTo ("hello" ))
657+ Expect (res .Rows [0 ].Fields ["t2alias" ]).To (BeEquivalentTo ("world" ))
658+
646659 options = & redis.FTAggregateOptions {LoadAll : true }
647660 res , err = client .FTAggregateWithArgs (ctx , "idx1" , "*" , options ).Result ()
648661 Expect (err ).NotTo (HaveOccurred ())
649662 Expect (res .Rows [0 ].Fields ["t1" ]).To (BeEquivalentTo ("hello" ))
650663 Expect (res .Rows [0 ].Fields ["t2" ]).To (BeEquivalentTo ("world" ))
664+
665+ _ , err = client .FTAggregateWithArgs (ctx , "idx_not_exist" , "*" , & redis.FTAggregateOptions {}).Result ()
666+ Expect (err ).To (HaveOccurred ())
651667 })
652668
653669 It ("should FTAggregate with scorer and addscores" , Label ("search" , "ftaggregate" , "NonRedisEnterprise" ), func () {
@@ -1268,6 +1284,7 @@ var _ = Describe("RediSearch commands Resp 2", Label("search"), func() {
12681284 val , err = client .FTCreate (ctx , "idx_hash" , ftCreateOptions , schema ... ).Result ()
12691285 Expect (err ).NotTo (HaveOccurred ())
12701286 Expect (val ).To (Equal ("OK" ))
1287+ WaitForIndexing (client , "idx_hash" )
12711288
12721289 ftSearchOptions := & redis.FTSearchOptions {
12731290 DialectVersion : 4 ,
0 commit comments