I am building a mobile app that uses Firebase services for the backend (Firestore, functions, etc).
Currently I store the latest best available geolocation (longitude, latitude) for every user in Firestore. What I'd like to do is to query Firestore to show users other users that are in the area (in addition to some other filters like age range).
How could I best do this? I tried to find anything regarding Firestore being able to query geolocation distances, but could not find anything. Does this mean I need to do these calculations on the client side?
It seems a bit much to query all the users (that could be anywhere in the world) and filter these client-side, or even in a cloud function.
Another thing that make it harder is that Firestore supports only one range field, so even if I were able to do some high level filter for geolocation (and doing the fine grained filters client-side), then it still means I can't use any other range filters in the query.
How do other applications approach this issue?
Thanks in advance for any pointers!