Lets assume I have an Angular Dart application with a firestore backend that e.g. stores books. Each book has a title, a summary and a published date. Now I want to add a fulltext search with pagination to my app. Since firestore does not have fulltext search I need to add this myself if I want to have e.g the first 10 books containing "cat" ordered by published date.
My first idea was to use the Elasticsearch docker container and deploy that on Google Cloud. Initially I tried to do this on Google Kubernetes but besides being a bit over-complicated it seems to cost way too much. Next I looked into Google App Engine with docker but this still seems to come up to 60$ per month since the Elasticsearch container needs 4GB ram.
So now I am stuck what to do. Look into Google Compute Engine and running docker inside a VM. I wonder how much that costs? Or maybe write something to interface with Google Cloud Search from a Google App instance exposing the results somehow?
All of this seems to be way to complicated for what I want to do. I might have like a thousand books to index which comes up to maybe 10MB in data and only a few thousand queries per month.
Cloud Firestore includes a no-cost tier to help you get started at no cost. After you exceed the usage and storage quotas for the no-cost tier, you're charged for the database operations you perform, the data you store, and the network bandwidth you use.
Reading data from Firestore There are two ways for retrieving data, which is stored in Cloud Firestore. Calling a method to get the data. Setting a listener for receiving data changes events. We send an initial snapshot of the data, and then another snapshot is sent when the document changes.
Algolia seems like the perfect/best solution for your use case. It is SO easy to setup and is lightning fast. Have a look at their docs and pricing and test it out yourself. There’s also a sample firestore function that may interest you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With