angular - 带半径的 Algolia 过滤器地理位置
问题描述
我使用 Algolia 在 Ionic 项目中使用 Firebase 进行全文搜索。我能够搜索和过滤所有对象。但是当我使用“aroundRadius”时,它什么也不返回。如果我评论“aroundRadius”并只使用“aroundLatLng”,它会返回所有数据而不关心位置。带有 lat 和 lng 的归档 _geoloc 也存在于我的数据中。
this.index.search(query,{
filters: filters,
aroundLatLng: location,
aroundRadius: radius
}).then((data) => {
console.log(data);
})
我是否需要对 Indice 进行任何特殊配置或语法错误?我跟着这个链接
解决方案
The problem solved. Everithing is ok by codding and result. It retrurns nothing because my current location was so dar awar from the location of objects I was searching. I tried test it with browser and not a real device and it got the incorrent location.
推荐阅读
- flutter - 我怎样才能在颤振上画出这个弯曲的抽屉?
- sql - PLSQL 在发布者表中添加新发布者,然后将其添加到发布者值为空的图书表中并以给定格式显示
- windows - 无法在 Windows 10 中保存文件并且文件资源管理器看起来不同
- mysql - mysql.connector.errors.ProgrammingError: 1064 (42000); 创建表
- servicestack - 将 PostgreSQL 聚合函数与 OrmLite 一起使用
- matlab - Matlab 如何在 2021a 的命令窗口中自动完成括号
- javascript - 为什么刷新 localhost 会发送/记录两个请求?
- sql-server - python + pyODBC + SQLAlchemy:SAWarning:未指定驱动程序名称
- javascript - 有没有办法让 getActiveRange() 函数在不同的电子表格上工作?
- javascript - 找不到模块但模块存在