#community-help

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.

Powered by Struct AI
+11
5
1mo
Solved
Join the chat
Aug 22, 2023 (1 month ago)
chase
Photo of md5-051f535431ff484f44f165e9a0b696a5
chase
06:18 PM
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
06:19
chase
06:19 PM
i’m curious right now if there is a kind of way to “blend” the sorting of those two if that makes sense
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:33 PM
07:34
Jason
07:34 PM
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
chase
Photo of md5-051f535431ff484f44f165e9a0b696a5
chase
11:07 PM
exactly what i was looking for thanks!
+11