How filtering works?

I have a question on how filtering, works.
When you use a function to filter data from a collection, Does it work by requesting and downloading all the collection and then filter what data to show OR in the first place it filters and then requests the specific documents.

Also if it works like the first example, is there any way to ask for specific documents (by document id) so you dont get all the documents and then filter what to show.
Im saying that because if you have a collection with 10000 documents and you just need 10 there is no reason to get charged with 10000 reads.

@JOHN_WORSHAM do you have any knowledge on how to ask for specific documents or for a list of specific documents from firestore (by document id)?
Thank you in advance

Hi there!

You have asked a fine question. The answer is that it depends on the data resource type.

For the Firebase connector the sorting/filtering is done in the API query, so you won’t get any extra items on Composer side.

Hope this helps!

ohh thats perfect in my case, thank you very much for your help.
So in other worlds, is it possible to get a collection with certain documents, by asking for certain document ids through filtering?