Combining Sorting Parameters in GeoSearch

TLDR chase asked if sorting parameters could be combined in geosearch. Jason suggested using the `precision` parameter for this purpose.

Photo of chase
chase
Tue, 22 Aug 2023 18:18:39 UTC

Jason quick question for you regarding geosearch / sorting of results! is there any chance that we can combine sorting parameters? i can sort by text similarity, and by distance, and have one or the other break a tie

Photo of chase
chase
Tue, 22 Aug 2023 18:19:08 UTC

i’m curious right now if there is a kind of way to “blend” the sorting of those two if that makes sense

Photo of Jason
Jason
Tue, 22 Aug 2023 19:33:32 UTC

Yup, the `precision` parameter might help:

Photo of Jason
Jason
Tue, 22 Aug 2023 19:34:17 UTC

It essentially forces a tie between all records within each specified x miles/kms bucket, and then the next field in the sort_by will be used for tie breaking within each bucket

Photo of chase
chase
Tue, 22 Aug 2023 23:07:58 UTC

exactly what i was looking for thanks!