问题
How can I order the documents in Firestore? It looks like Firestore lists documents in alphabetic order by the ID I let Firestore automatically create. But I don't want that. I just want to see my newly added document added as the last document in the collection. How do I do that? Should I create my own alphabetic ID's?
Example of my collection in Firestore:
回答1:
Firestore is meant to scale massively. At that scale, it doesn't matter what order the documents appear in the console, because the console is useless for viewing massive numbers of documents within a collection.
If you still need an ordering in the console, you will have to come up with document IDs of your own.
来源:https://stackoverflow.com/questions/50447426/how-can-i-order-the-documents-in-firestore