Proposal: Meilisearch on Bolt.fun
Hey Bolt.fun! My name is Wamy and I am a professional web developer and I have lots of experience with search engines, namely Meilisearch. I have been asked to assist the development team on Bolt.fun to integrate Meilisearch into the site so user's such as yourself can easily search for Projects, Stories, Users, tags, and even content inside Stories; yes, Meilisearch is just that good.
Meilisearch is an open-source search engine that is written in Rust (Actix Web) and it's super fast, read more here for info. It makes working with Meilisearch really easy as it is RESTful. Searches always take less than 1 second, no matter how large the database, and that is on the slow side. I have 2 websites currently that are based off of Meilisearch, Rakun and Rezi. Rezi get's about 4k users per day, which is almost 75k searches per day and it runs without problem on a cheap 2 core, 4gb ram vps with other things running as well. It's fast too, test it out yourself. So don't worry about performance.
My idea on how to implement Meilisearch will go as follows:
UI side:
-
Main search bar in the header right in the middle that will allow you to search for anything; user, story, tags, content, etc. Because Meilisearch is meant for "search as you type" which is exactly as it sounds, items are shown right as you start your search. This will show a box as you search with the top 10 results. If you don't like these results, search more, or you can click a little arrow, that will take you to a full size search page. (As the site is currently laid out, this will have to be it's own separate page unfortunately.)
-
When clicking on a result, it will take you straight to the user, post, whatever it returns. This is done because Meilisearch is really it's own database and can store data with each item, meaning it will take you straight to where you want to be.
Tech side (this is the fun part):
-
To get the initial data into the Meilisearch database, it would require a small script that would take everything inside of the current database and transfer it over to Meilisearch properly. This will likely be a custom python script tailored to the database and the items we want to search by.
-
This will solve the initial data, but how do we solve fresh data? Every time data is added to the current database, it will then be written to the Meilisearch database. Luckily, Meilisearch allows this updating of documents. Meilisearch is a document database meaning that every item has it's own ID, which can be literally anything as long as 2 documents never match, so, we can match the current DB ID's with the Meilisearch ID's and access them exactly the same using that endpoint. If data is added, it will be added to Meilisearch in exactly the same way. Pretty neat huh? I love Meilisearch...
-
For the most part this covers most bases. The instance will be hosted at
search.bolt.fun
. The rest of the documentation can be found at here. For more information check this story.
I am really excited to be working with Meilisearch again! Please let me know your ideas, and any other information you may be looking for.