--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/37f6086f-49c5-4b2e-b7dd-5eb29a7aea92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi there,You are correct. If you want to order data by timestamps then you will need to add an explicit timestamp field to your documents before adding them to Cloud Firestore. You can either set this value to the time of the tweet, or use Firestore's "server timestamp" to record the time of insertion:- Sam
On Tue, Apr 16, 2019 at 9:55 AM coltonidle via Firebase Google Group <fireba...@googlegroups.com> wrote:
I have a fairly simple example project I'm working on. I have a root collection that holds "tweet" documents. I want to have an api using cloud functions that allows someone to get the last 10 tweets.--I have looked at documentation here https://firebase.google.com/docs/firestore/query-data/order-limit-dataI have seen that I can limit my results fairly easily. What I didn't see is any guarantee in terms of ordering in terms of insertion into Firestore. For my example, in my project I don't actually save the timestamp of a tweet, and so this may be problematic? In a relational database, I could rely on the insertion order, and just say "Give me the last 10 tweets from my tweets table"In Firestore there doesn't seem to be any guarantee what order items are inserted, therefore, what way they come back. Can anyone shed some light on this?
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fireba...@googlegroups.com.