mirror of https://github.com/go-redis/redis.git
Add RediSearch Support
This commit is contained in:
parent
5bbd80d943
commit
e19280fcdd
|
@ -53,4 +53,5 @@ URI
|
|||
url
|
||||
variadic
|
||||
RedisStack
|
||||
RedisGears
|
||||
RedisGears
|
||||
RediSearch
|
||||
|
|
|
@ -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
|
||||
}
|
|
@ -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() {
|
||||
|
||||
})
|
||||
})
|
Loading…
Reference in New Issue