Add RediSearch Support

This commit is contained in:
ofekshenawa 2023-09-11 14:55:29 +03:00
parent 5bbd80d943
commit e19280fcdd
3 changed files with 43 additions and 1 deletions

View File

@ -53,4 +53,5 @@ URI
url
variadic
RedisStack
RedisGears
RedisGears
RediSearch

14
redis_search.go Normal file
View File

@ -0,0 +1,14 @@
package redis
import (
"context"
)
type SearchCmdable interface {
}
func (c cmdable) FT_List(ctx context.Context) *StringSliceCmd {
cmd := NewStringSliceCmd(ctx, "FT._LIST")
_ = c(ctx, cmd)
return cmd
}

27
redis_search_test.go Normal file
View File

@ -0,0 +1,27 @@
package redis_test
import (
"context"
. "github.com/bsm/ginkgo/v2"
. "github.com/bsm/gomega"
"github.com/redis/go-redis/v9"
)
var _ = Describe("RediSearch commands", Label("gears"), func() {
ctx := context.TODO()
var client *redis.Client
BeforeEach(func() {
client = redis.NewClient(&redis.Options{Addr: ":6379"})
Expect(client.FlushDB(ctx).Err()).NotTo(HaveOccurred())
})
AfterEach(func() {
Expect(client.Close()).NotTo(HaveOccurred())
})
It("should FT_List ", Label("search", "ft_list"), func() {
})
})