Algolia aroundLatLonViaIP 没有返回更远的结果

Algolia aroundLatLonViaIP not returning results further away

我有一个大型对象数据库,我想在其中显示最接近用户搜索的对象,因此我使用 aroundLatLngViaIP

这适用于附近的对象,但是,如果附近没有任何对象,即使文本完全匹配,它也不会显示得更远。

是否可以使用aroundLatLngViaIP来提升附近的结果但不排除远处的结果?

为此,您需要使用 aroundRadius: all 作为附加查询参数。引用文档:

The special value all causes the geo distance to be computed and taken into account for ranking, but without filtering; this option is faster than specifying a high integer value.

https://www.algolia.com/doc/api-reference/api-parameters/aroundRadius/