admin管理员组文章数量:1131469
I am trying to create a search query with redis and filter based on the id of the document. It seems we need to use the INKEYS
command, but it doesn't work for the key ru203:book:details:9780002005883
even after escaping the :
.
The command "FT.SEARCH" "books-idx" "@author_ids:{1 | 2} INKEYS 1 ru203\\:book\\:details\\:9780002005883" "NOCONTENT" "LIMIT" "0" "10000"
doesn't return anything. Am I using the command correctly?
(without the INKEYS
part, 2 documents are returned)
Edit: the method in redis-py is Query.limit_ids
I am trying to create a search query with redis and filter based on the id of the document. It seems we need to use the INKEYS
command, but it doesn't work for the key ru203:book:details:9780002005883
even after escaping the :
.
The command "FT.SEARCH" "books-idx" "@author_ids:{1 | 2} INKEYS 1 ru203\\:book\\:details\\:9780002005883" "NOCONTENT" "LIMIT" "0" "10000"
doesn't return anything. Am I using the command correctly?
(without the INKEYS
part, 2 documents are returned)
Edit: the method in redis-py is Query.limit_ids
1 Answer
Reset to default 1Redis Insight interprets all inserted characters as part of the query, including optional arguments such as INKEYS or LIMIT. To use optional arguments, you can try Workbench. It also offers syntax auto-completion for Redis Query Engine.
本文标签: redisHow to use INKEYS to filter by the keydocumentidStack Overflow
版权声明:本文标题:redis - How to use INKEYS to filter by the keydocument_id? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736759426a1951467.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论