Closed lsps9150414 closed 5 years ago
Not really, not in a way that would allow skips. On client side you could allow firestore to cache results and slowly expand the radius of the query. But otherwise I would say not really. This is a limitation of how this sort of hashed and aggregated query works.
That means every time I increase the radius, it would return me the older set of data, is that correct ? If I am right, is there a way I can pass an inner radius, does that even make sense ?
You're right in this. Another method you could implement is to use a limit and increase the limit while the radius stays the same. This method can be expensive though as you are reading more docs than you need.
There is no inner radius query function, as implementing that would add a significant weight to the project (it would require hackery, as it's not really how geohashes work)
Two methods would be just as expensive because you are asking for more data than you need, first because you repeat data and the other because you ask for more than you initially need ...
My concern wasn't about requesting extra data (which is a cost), I was considering the cost of generating these more unique queries.
Now that we don't have an available option. I have implemented my search with increasing the radius by 0.15kms. Something I have to live with right now.
I am trying to see if I can read the first set of docs from the cache, and the new paginated data from the server.
I am reading these:
So in my use case, the user may have potentially thousands of nearby locations to query and I need a way to paginate them. Does the above information mean that it can't be done?