#community-help

Server-Side Sorting for Restaurant Query Results

TLDR Ivy inquired about server-side sorting for restaurant query results. Kishore Nallan explained potential latency issues with server-side sorting.

Powered by Struct AI
pray1
Apr 25, 2023 (5 months ago)
Ivy
Photo of md5-2f39998c05c5409f8c3521187ec34d4e
Ivy
06:33 PM
Hello! We're looking for some advice on how best to query for some results (~thousands) and then sort them server-side. We plan on searching on different restaurants & food items but want to display the results sorted by what time the restaurants are open, which we don't want to have in Typesense because of perceived complexity. Thanks in advance 😁
Apr 26, 2023 (5 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
03:10 AM
Sorting on server side is certainly going to be inefficient because you will have to fetch thousands of document JSON over the wire which will introduce large network latency.
pray1