Does filtering documents from firestore like this costs by number of documents in collection or number of returned documents , let's say if I have 1000 documents in the collection and filter data like this to get 20 documents , it is considered 1000 reading or 20 reading ?
final ordersRef = firestore.collection("orders");
var query =
ordersRef.snapshots().map((snapshot) => snapshot.docs.where((doc) {
DateTime orderDate = DateTime.parse(doc["ordered_at"]);
return unifyDateFormat(previousDay)
.isBefore(unifyDateFormat(orderDate)) &&
unifyDateFormat(nextDay).isAfter(unifyDateFormat(orderDate));
}));