Closed iamswain25 closed 6 years ago
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).
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()
.orderBy
s, it can not support two orderBy
s 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.I'll be updating the docs to reflect this.
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