I need to retrieve a big amount of data.
I'm trying to order by 'id'. But the query returns an empty collection. if remove orderBy('id') it works properly.
How to sort by document id?
mQuery = docRef.orderBy('id')
              .limit(bulk_size)
                .get();


Firebase firestore db orderBy document id
When you call .orderBy('id') it means that you trying to order the documents that you get from Firestore according to a field called id. If you want to order the documents according to the document ID, then please use:
mQuery = docRef.orderBy(firebase.firestore.FieldPath.documentId())
               .limit(bulk_size)
               .get();

