We are developing an app that needs to show 50 'available' users inside a given distance range (users can be 'available' or 'not available'). On a Firebase cloud function, GeoFirestore is used to perform geoqueries to filter by distance, and the user 'availability' is checked client side (due to Firestore inequality signs usage limitations).
Now the problem is..
Does anyone know how to paginate the results at a query level? Pagination would be extremely useful to reduce number of reads on Firestore and consequently to contain costs. It is NOT mandatory results are sorted by distance, the goal is to find 50 'available' users inside the given range in a dataset of hundreds of thousands users.