The Firebase Firestore documentation says:
Get multiple documents from a collection
You can also retrieve multiple documents with one request by querying documents in a collection. For example, you can use where() to query for all of the documents that meet a certain condition, then use get() to retrieve the results:
var citiesRef = db.collection('cities');
var query = citiesRef.where('capital', '==', true).get()
.then(snapshot => {
snapshot.forEach(doc => {
console.log(doc.id, '=>', doc.data());
});
})
.catch(err => {
console.log('Error getting documents', err);
});
If I have a collection with N documents, would I incur a N-read fee or a single read, for the above query?
Is there any way to retrieve the read/write count on a per call basis using the SDK?
As some background for my rational for asking, I have a single collection with a large number of documents (around 20,000). I want to export the entire collection's documents in the most cost efficient manner (least reads).