【问题标题】:Not able to retrieve the Date and Time fields data from redis DB by using RediSearch无法使用 RediSearch 从 redis 数据库中检索日期和时间字段数据
【发布时间】:2021-07-22 10:40:38
【问题描述】:

我们在 Spring Boot 应用程序中使用 RediSearch (io.rediseach.client.Cleint) 从 redis DB 获取记录。我们无法获取日期和时间列值(例如:日期为 2021 年 7 月 21 日,时间为 09:12)并且其他列被正确检索。你能帮我解决这个问题吗?我们需要在搜索查询中添加什么)

以下是参考代码

private final Client client; Query q = new Query("@columnName:"+columnValue); ex: Query q = new Query("@empName:"+raju); SearchResult result = client.search(q);

【问题讨论】:

    标签: spring-boot redis redisclient


    【解决方案1】:

    您似乎在查询方面缺少转义。

    RediSearch 解析器要求用户转义特殊字符。

    您可以在 redisearch.io 上的 Controlling Text Tokenization and Escaping 阅读更多信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-30
      • 1970-01-01
      • 1970-01-01
      • 2020-01-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多