In Firestore I have a users collection and within each user document is stored a collection named favorites which contains the IDs of documents marked as favorites(stores)
For example:
in users/2pfV9FbtwPYFmQHz3KU2BKmhMr82/favorites I have multiple documents such as 7F9COWGW3Ww8FWiH8VTA and 8b8WogHzpqCkw0ZxMjOw
I would like to make a query that returns all of the documents with the same docID from a collection called stores which contains these 2 IDs and many more(that are no in favorites list)
A similar query will be
SELECT * FROM stores WHERE docID EXISTS IN favorites
I could take another approach to get both collections and manually filtrate them, but I am using Firebase RecyclerView adapter which all data displayed is based on the Query and will make things more efficient.
How can such result be achieved? let me know if further explanation is needed