MichaelSolati / geofirestore-js

Location-based querying and filtering using Firebase Firestore.
https://geofirestore.com
MIT License
504 stars 58 forks source link

Please Is there any way to do pagination with geofirestore #149

Closed jerryheir closed 4 years ago

jerryheir commented 4 years ago

I am working on a project and I can't seem to find a way on the documentation on how to paginate data like when using .startAfter when querying without using geofirestore. My question is, how do I paginate data being fetched using geofirestore

georgeMorales commented 4 years ago

It's impossible the way you could paginate with Firestore.... https://github.com/geofirestore/geofirestore-js/issues/144

jerryheir commented 4 years ago

what can we do?

On Sun, Dec 1, 2019, 9:49 PM Nwaeze Jerry nwaezejerry@gmail.com wrote:

Wow. Straight up. No workaround. Nothing. . . That's not scalable at all

On Sun, Dec 1, 2019, 9:33 PM Jorge Morales López notifications@github.com wrote:

It's impossible the way you could paginate with Firestore....

144 https://github.com/geofirestore/geofirestore-js/issues/144

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/geofirestore/geofirestore-js/issues/149?email_source=notifications&email_token=AHDHZJ4KKIU47KYUHWEFFYDQWQNRLA5CNFSM4JTM3NFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFRUX4Y#issuecomment-560155635, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDHZJ5EOF3LEAVIAC3Z4OTQWQNRLANCNFSM4JTM3NFA .

MichaelSolati commented 4 years ago

Thanks @JorgeMoralesLopez, unfortunately because of the complexity and the fact that geohash queries aren't inherently suited for pagination this isn't something geofirestore will support.

georgeMorales commented 4 years ago

@jerryheir What I do is increase the limit, I know it is a poorly optimized page but there is no other formula. What I did is create two types of users, one short and one long ... The short one is the one I use with geofirestore and it is the one I show first ... if the one who is using the app wants more details because when it comes in it does a request to the user with more details. Also putting heavy things like images in subcollections helps. The truth is that it hurt when I knew that I could not do real paging with geofirestore or with firestore using geopoints, I already had the MPV quite advanced and I did not know what other option to take, but thanks to @MichaelSolati and geofirestore I have been able to follow this way

jerryheir commented 4 years ago

Thanks ... I think its fine. I really appreciate your response

On Mon, Dec 2, 2019, 8:24 PM Jorge Morales López notifications@github.com wrote:

@jerryheir https://github.com/jerryheir What I do is increase the limit, I know it is a poorly optimized page but there is no other formula. What I did is create two types of users, one short and one long ... The short one is the one I use with geofirestore and it is the one I show first ... if the one who is using the app wants more details because when it comes in it does a request to the user with more details. Also putting heavy things like images in subcollections helps. The truth is that it hurt when I knew that I could not do real paging with geofirestore or with firestore using geopoints, I already had the MPV quite advanced and I did not know what other option to take, but thanks to @MichaelSolati https://github.com/MichaelSolati and geofirestore I have been able to follow this way

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geofirestore/geofirestore-js/issues/149?email_source=notifications&email_token=AHDHZJ5QFMGCIAXYZZUEABLQWVOGVA5CNFSM4JTM3NFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFUTKKI#issuecomment-560543017, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDHZJYDCMV4QODRN44UIW3QWVOGVANCNFSM4JTM3NFA .