You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So ref.limit will not really work all the time... It's a side effect of how the service works, you can see an explanation here.
Anyway, I did some digging and testing, and here are a few issues regarding Firestore queries and GeoFirestore (and the docs should and will be updated to reflect this).
You can not use startAt or similar modifiers (startAfter, endBefore, endAt) with GeoFirestore since we append the geo based modifiers to the end of a query and you cannot specify an orderBy() constraint after calling startAt(), startAfter(), endBefore() or endAt().
It looks like while Firestore could support two orderBys, it can not support two orderBys AND two of the previously mentioned modifiers (startAt, startAfter, endBefore, endAt). It seems as if it has been somewhat documented as an issue here by a member of the Firebase team.
this one works
const query = ref => ref.limit(4)
const geoQuery = geofirestore.query({ center, radius, query })
this one doesn't
const query = ref => ref.orderBy('d.createdAt', 'desc')
const geoQuery = geofirestore.query({ center, radius, query })
nothing comes through key_entered event listener
I set the indexing on firestore as it advises me to:
d.createdAt DESC g ASC
The text was updated successfully, but these errors were encountered: