Reputation: 4861
I have a large databases of objects where I'd like to show objects that are nearer to the user searching first so I'm using aroundLatLngViaIP
.
This works well for objects that are near by, however, if there aren't any nearby it doesn't show any further away even if there is an exact text match.
Is it possible to use aroundLatLngViaIP
to promote results nearby but not exclude those that are far away?
Upvotes: 0
Views: 77
Reputation: 579
To achieve this, you need to use aroundRadius: all
as an additional query parameter. Quoting from the doc:
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/
Upvotes: 1