In my application users can like certain posts. Their likes will be stored in this way.
Image of the database:
Basically: in the collection Posts -> postID -> collection Likes -> userID -> timestamp. What I want to get is the number of userIds within the Likes collection for all posts. Basically I want to display the number of posts with the highest likes first in my Recycler Adapter.
I believe I am looking for a query of the type that would help me get the number of currentUserIds and then display them in descending order in my adapter:
Query firstQuery = firebaseFirestore.collection("Likes").document(currentUserId)...