如何在 spring 启动时使用 reactiveredisoperations 执行 redis 扩展命令?

How to execute a redis extension command with reactiveredisoperations in spring boot?

我正在尝试将 redisearch 与 java/spring 反应式 api 结合使用。因此,对于 nodejs redis 客户端,我可以只使用 send_command 函数并将我想要的任何 redis 命令作为字符串数组传递。这非常适合向 Redis 发送重新搜索命令。

现在我正在使用 java 和 Spring Data Reactive Redis。 ReactiveRedisOperations 接口有一个 exec 方法,但它似乎只执行 lua 脚本和什么不是。

有什么方法可以使用 ReactiveRedisOperations 将 redisearch 命令传递给 redis 服务器?

制作命令请求和解析响应不是微不足道的任务,您可能希望为 Java 使用 RediSearch 客户端:https://oss.redislabs.com/redisearch/Clients.html