Building search suggestions for a website
I want to build a search engine for a small website. Agolia or mellisearch would do the work, but they are over my requirements in terms of price and features.
A simple search suggestions would do the work for me. Like building a API that searches the d1 database for given query and return results, but I think this is expensive as it has to go through whole database everytime. And indexes help but i came to know that indexed don't auto update when more data is added to database.
So it there any other way to build this simple in terms of price and code, other than using third party solutions like algolia or builiding an api that queries whole d1 database everytime for each letter of search word? I also came to know about Full Text Search?
4 Replies
I read that indexes auto update and be in sync with table. Is that the case with d1?
there is a talk that I saw a few months ago, about js based full text search, that also works with workers, they also have free plan deployed to cloudflare, here is the link, https://oramasearch.com/. BTW, they were also known as lyra search before. I probably heard another name when they first created the system and I am not sure why they keep changing their name. Whatsoever, you can look into it!
Wow, this fits all my need including pricing, although there docs is missing for cloud, no problem, as it takes about one month to build my project, till then I think they will update their docs.
Anyway, thanks for your suggestion.
My pleasure!