Code Story · Transcripts

S11 E2: The 4x Faster Indexer: Scaling Rust-Based Search to Millions of Documents Without Infrastructure Bloat with Clément "Kero" Renault, Co-Founder & CTO of Meilisearch

June 3, 2025 · 16:53
Listen to the episode Download .txtDownload .vtt
Clément Renault

I think that the best decision we took was to hire people to manage a product roadmap and to organize stuff depending on who's willing to be interested in these features, who's willing to use the cloud for that. So we prioritize features for customers who want to index millions of documents, who want like low latency search requests, who are willing to pay for that. We still make the engine available and accept pull requests, obviously. But we also make sure that the most important features are the ones that follow future decisions. My name is Clément Renault, aka Kero, and I'm from Meilisearch.

Noah Labhart

This is Code Story, a podcast bringing you interviews with tech visionaries.

Sound bite

It's been six months moonlighting. There's nothing on the back end. I don't exactly know what to do next. A company is its people. The teams help each other achieve more. Most proud of our team. Yes, we've been fighting it as we've grown. Total waste of time. It's not an easy thing to achieve, my dear. Took it off the shelf and dusted it off and tried it again.

Noah Labhart

You need to read.

Sound bite

It's not just about technology.

Noah Labhart

All this and more on Code Story. I'm your host, Noah Labhart. I'm your host, Noah Labhart. And today, how Clément "Kero" Renault built a refreshingly simple search that's lightning fast and enhanced with AI. Clément "Kero" Renault wanted to be an architect when he was younger. During that time, he also learned about computers and built his first website. And since then, he's never stopped building. Funny story, he lost that first website because it wasn't on Git. Outside of his professional life, he likes to draw, craft, and to cook. He also enjoys video games and mentioned Hidden Reign was his favorite game of all time, alongside the likes of Cyberpunk. Seven years ago, Kero was in school, and he wanted to build a solid search experience, but not just a general search. one that indexed your data and allowed you to have a Google just for your info. After winning a school hackathon, Kero and his mates wanted to take it to the next level. This is the creation story of Meilisearch.

Clément Renault

So Meilisearch is a search engine as a search engine not like Google, not a search engine that search in public data, but more like on the data you provide it. an e-commerce website, marketplace, or any SaaS application you want to build, just plug Meilisearch and it will be able to provide a search bar on your website and search into whatever you want and it will find. You have a couple of settings to make sure that you have a good experience, search experience, and that's it. It's done. It indexes your stuff in the background. You don't have to worry about that. So Meilisearch is seven years old now. It started in November 2018, and we were trying to create a good search engine for an e-commerce website we were working at with two other co-founders, Quentin and Thomas. We found out that Algolia back then was very good actually in terms of relevancy and experience, so we built the same. We just looked at the API and the way people can use the engine and crafted something from scratch. It took us like something like two to three months, not even that, maybe less, to build something like useful. And we won a hackathon organized by Louis Vuitton back then at school because we were working at school because we haven't got a lot of money back then. This hackathon like created Meilisearch. Like we won that. We had a lot of money, a bit of money. And we crafted Meilisearch from there, working for Louis Vuitton for some time. months and from there it began.

Noah Labhart

Let's dive into that MVP that you built and maybe it's the one where you know you built it for the hackathon or maybe it's later you tell me that I'm curious about that portion and that initial product and what sort of tools you're using to bring it to life.

Clément Renault

So I was working on this project back then there was another team from the e-commerce website that we were working for that was working on the same projects. And at the end, my project was a bit better, and we decided to go with that with my two mates. It was all built in Rust because I'm a big Rust fan, contributor of the Rust language, specifically the standard library. It was based on RocksDB back then and something like, not Actix, but another HTTP server. There was not a lot of stuff needed to create a good server with a good backend to store documents and index stuff. So it was built on RocksDB, Roaring Bitmaps from Daniel Lemire, and an HTTP server in Rust, I don't remember the name. And that's it. Then a couple of algorithms and a couple of time to understand how the algorithms must be like tweaks, modified, improved for performances. And you have the good first version of Meilisearch.

Noah Labhart

Let's stay on the MVP for a minute. And I'm curious about decisions and trade-offs make when you were building that? Maybe there's probably some decisions in how you built it originally, but I'm real curious about how you built it after you won the hackathon and what sort of decisions you had to make in how you went about solving the problem. It could be technical debt acceptance. It could be choice of language, which I hear you mentioning Rust. And I'm curious about those and how you coped with the decisions.

Clément Renault

When we were working for Louis Vuitton, we were just like following what they wanted us to build. First, we signed contracts with Louis Vuitton to build this search engine in full of open source, which is very cool, actually. So all the features we were building for Louis Vuitton were also open source and available to anyone. So we built a lot of replication systems on top of Meilisearch. So systems that duplicate the content that is sent to Meilisearch and the search queries too, so that we were capable of having three Meilisearch running for the whole Louis Vuitton website. site. Everything built from scratch. It was probably not a good idea, but back then it wasn't even decision-like. We had to do something. We were crafting it from scratch and there were a lot of bugs, but at the end we figured out how to fix that and it was working quite great.

Noah Labhart

So let's move forward then. I'm curious about how you went about building your roadmap, right? So So how did you progress and mature your product? And I'm curious about what sort of criteria you went through to decide, okay, this is the next most important thing to build or to address with Meilisearch.

Clément Renault

I think that the best decision we took was to hire people to manage a product roadmap and to organize stuff depending on who's willing to be interested in these features, who's willing to use the cloud for that. So we prioritized features for customers who want to index millions of documents, who want low latency search requests. We are willing to pay for that. We still make the engine available and accept pull requests, obviously. But we also make sure that the most important features are the ones that follow future decisions or future improvements to the search engine. We decided to go with vector storage and embedding storage and semantic search. And we designed hybrid search based on the fact that people want to be able to find documents even by asking questions or just sending semantic requests. The result is very astonishing. We have an hybrid search that is very good, actually, probably one of the best. and we are planning to work on the Ask feature, like a way to talk to Meilisearch so that you can ask questions, retrieve content, and understand what's in your database and when stuff were imported, when they will be deleted, and stuff like that.

Noah Labhart

Okay, so I hear you saying we a lot in your last answer. I'm curious about how you built your team and what you look for in those people to indicate that they're the winning horses to join you. One

Clément Renault

of the things we are looking for to hire people is the passion of people. Are they willing to take time to understand the product and do they want to make Meilisearch the best search engine or AI-asked server of the world? And also, it's also the feeling of the person we are hiring, like we are working with. The way people feel with you and communicate with you, are they like your friends or are to just be paid and stuff like that. It's more about like vision and friendliness, I think.

Noah Labhart

Let's talk about scalability. And this will be interesting, given I'm certain that it's core to how you've built it. Was this built with scale in mind from day one? Or have there been interesting areas where you've had to fight it as you've grown?

Clément Renault

We were making sure that the engine was capable of scaling vertically. For a long time, I'm making sure that the engine was capable on a single instance to index a lot of documents. When I say a lot, like back then in 2020, I would say, we were capable of handling like 2 millions and that's it. Now with a new engine, we are capable to handle like more than 500 millions without sweat. If you give the good passion, you are capable of handling that without any issue. It takes time. I wrote a lot of blog posts. We spent like probably a year on making sure that the engine is capable of handling that. But it's been like since the beginning, we are trying to make it scale as far as we can. And recently, we decided to go like one step further and scale horizontally, like being able to shard the content, not only replicate, but shard the content. because when you have 500 million documents to index, replicating is not something that you want because you will just duplicate, like multiply the number of large machines you need. So the best thing to do is to shard, split your content into three, for example, with three machines, and then you can go with smaller machines and index in one third of the time.

Noah Labhart

So as you step out on the balcony, you look across all that you've built, what are you most proud of?

Clément Renault

I think Meilisearch itself. Meilisearch Vector Store also, which is called Arroy. Arroy is something quite interesting. It's a vector store that has been built by Spotify around 2015, maybe. Something like that. I don't remember. It's in C++. And we decided to find a good solution for Meilisearch to store vectors on disk and not in RAM. Disk is better for durability. Not better, but it is durable. So you need to store the content on disk. So we decided to just take a look at this Annoy library from Spotify, and we created Arroy, so in Rust, which just takes, we took the C++ base and move it, just transform it to be Rust compatible, like InfoRust, and put the contents in LMDB instead of custom formats, which was justified. We needed that to be in LMDB just to make sure that it was durable, along with the document you send your Meilisearch with. It took something like two months, something like that, to have something that works well. And at the end, it's very good, actually. We are still working on that on the right to make sure that it doesn't consume too much memory and stuff like that. But at the end, we are very happy about the result we have.

Noah Labhart

Let's flip the script a little bit. Tell me about a mistake you made and how you and your team responded to it.

Clément Renault

There is a specific version of Meilisearch that was completely broken. We released a version which, like, one day before Christmas, nobody was at the office, and we had to fix it, like, in a rush just before Christmas. It was one of the largest mistakes we did. We fixed it, like, in a week. We decided to remove the version and to fix it just on our side after. And I think how the team reacted was cool. We decided not to punish anyone or to tell anyone that they did something bad, but more like inspect and analyze what happens and how to make sure that we don't do the same mistake again. It was more like a way to grow than a way to be sad.

Noah Labhart

Let's move forward then. What does the future look like for the product and for your team?

Clément Renault

Products, I think that it will be the 10 times you hear that, but it's probably AI. We will work on something very interesting. It's called like the Ask route. It will be a route on Meilisearch to ask Meilisearch about stuff. You will be able to put it in a single click on any website you want that you own. You will have a search bar that you can ask stuff for. And you will say, yes, it's a 10 companies that does that. But Meilisearch is more like more than the others. but we plan to be like instant. Instead of having to wait 10 minutes, not 10 minutes, 10 seconds for an answer, you will just have that instantaneously. And we will see how it behaves, but we have great plan for that. About the content, being able to correctly read through the content, the LLM understand how and what is in an index to be able to answer correctly and with the most relevant queries and answers possible.

Noah Labhart

Let's switch to you. Kero, who influences the way that you work? Name a person or many persons or something you look up to and why.

Clément Renault

I follow a lot of Rustaceans. Yes, it's like a religion for me and for a lot of people doing Rust. It's not a bad thing. It's a good thing, I think, because it makes you like think twice before doing something. Is it something that I want to do? Is it dramatic in Rust? And if it's not, is it a good way to build something that is not dramatic? probably follow Steve Klabnik and a lot of other people who are Rustaceans, Rust lovers. This person, maybe I follow Sam Altman and people in the AI space, but it's more like to be sure that I follow the trend and I understand what's happening because it's happening very fast. And also in terms of company, OpenAI is a company that is trying to make money, at least trying. And I think that at least trying to follow what they do and what they plan and how they the design, the API, and how they make people pay for stuff and other stuff is a good thing for Meilisearch to follow or at least to understand.

Noah Labhart

Okay, Kero, last question. So you're getting on a plane and you're sitting next to a young entrepreneur who's built the next big thing. They're jazzed about it. They can't wait to show it off to the world. And can we show it off to you right there on the plane? What advice do you give that person having gone down this road a bit?

Clément Renault

always be something for someone who is willing to use stuff and not just for your own interest nobody will buy something that you are the only one to believe in don't try to enforce too much stuff and make sure that your product will be used by by probably companies or customers depends on your business and also make sure your time is very important so don't spend too much time on small stuff and I'm giving this advice to myself too.

Noah Labhart

Both fantastic pieces of advice. Well, Kero, thank you for being on the show today and thank you for telling the creation story of Meilisearch.

Clément Renault

Thank you, Noah. Thank you very much.

Noah Labhart

And this concludes another chapter of Code Story. Code Story is hosted and produced by Noah Labhart. Be sure to subscribe on Apple Podcasts, Spotify your choice. And when you get a chance, leave us a review. Both things help us out tremendously. And thanks again for listening.

Transcribed with Whisper and reviewed for names and terms; speaker labels are automatic and may contain small errors. Timestamps link to that moment of the transcript.