firebase - 在firestore中,如何搜索包含相似文本的字段
问题描述
在firestore数据库中,有一个位置字段,例如:
{
...
"location" : "London, England",
...
}
我想得到这个搜索词:伦敦/伦敦/英格兰/英格兰
到目前为止,我已经尝试过:
Firestore.instance
.collectionGroup("posts")
.orderBy(location)
.where(location,
isGreaterThanOrEqualTo: widget.location)
.where(location,
isLessThanOrEqualTo: widget.location + "z")
如何解决这个问题?
解决方案
推荐阅读
- php - 如何使用 HelperForm 在模板中插入图像?
- ios - 在 Xamarin.ios 上获取 VPN 连接状态
- unity3d - 游戏对象奇怪地移动
- r - R Data.table 奇怪的搜索问题。(不可打印的字符?)
- android - 在 webview 前面带有 adview、webview 和搜索输入的 XML
- python - 如何在 python 中使用相同的轴在同一个图形上绘制多个信号
- json - Apply regex pattern in jolt specification to find attribute is alphanumeric or number
- regex - 正则表达式帮助。修改正则表达式以排除大括号内的内容
- java - Spring Boot Banner 报错java版本
- typescript - TypeScript(泛型):推断数组类型的错误