I have a ‘Document’ collection, and I have a query that filters those documents based on the expiration date ( typically around 50 documents).
Those documents are being displayed in my home page.
My home page has a search button that opens up another component where search functionality takes place.
My original approach was filtering straight from the firestore, but I was monitoring the number of reads every time I “instant filtered” the collection, and it was crazy. I had around 1K read for just handful of searches.
So what I did was, I passed that query as component props to the search component so I am left with an array of object, and I simply filtered that array on the frontend, and didn’t have to deal with firestore and the crazy amount of read.
I am using a filter pipe and it is working perfectly.
What I would like to ask, would this approach slow down my application, knowing that the query will probably contain bet 50-80 documents max? I know it is not a good practice, but it is less expensive than querying straight from firestore.
Thanks in advance.