获取Gql中包含单词(不区分大小写)的记录?
是否可以编写单个 Gql 查询来检索包含搜索字符串的记录?
数据存储包含以下记录:
addax Crest Addrest Drest Armrest admix
我需要获取包含单词“Rest”的记录(不区分大小写)
Is it possible to write a single Gql Query for retrieving the record which contains a searching string?
Data store Contains following Records:
addax Crest Addrest Drest Armrest admix
I need to get the Records which contains the word "Rest" (Case insensitive)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
AE 尚不支持全文搜索,它位于路线图中,因此我们可以期待一下。
如果您只是尝试以不区分大小写的方式匹配单个单词,则可以将所有单词存储在 ListProperty 中,并确保它们始终以小写形式存储。这样您就可以轻松地以不区分大小写的方式查询它们。
Full-Text-Search is not supported in AE yet, it's on the roadmap so we can look forward to it.
If you are just trying to match single words in a case insensitive way, you could store all your words in a ListProperty, and ensure they are always stored in lowercase. That way you could easily query for them in a case insensitive mannor.
您可以使用 可搜索模型
You can get some full text search features using SearchableModel