Meilisearch: The Blazingly Fast Search Engine That Makes Elasticsearch Look Like a Dinosaur
Let me tell you about the time I spent 3 days trying to configure Elasticsearch.
I wanted to add search to a simple e-commerce site. 5,000 products. That’s it. I didn’t need distributed search across 50 nodes. I didn’t need “elastic” anything. I just needed… search.
I downloaded Elasticsearch. It required 2 GB of RAM just to start. I gave it 4 GB. It crashed. I gave it 8 GB. It started. Then I spent 3 days configuring:
- Index mappings (```json
- Analyzers (```json
- Tokenizers (```json
- Filters (```json
- Query DSL (```json
- Relevance tuning (```json
- Synonyms (```json
- Stop words (```json
- …
After 3 days, search kind of worked.
Then I discovered Meilisearch.
Downloaded it. Ran ./meilisearch. It just worked. No config. No 2 GB RAM requirement. No elasticsearch.yml with 500 lines of options.
I had search running in 15 minutes. With better relevance than my 3-day Elasticsearch setup.
That was 6 months ago. I haven’t looked back.
The Elasticsearch Complexity Problem (A Cautionary Tale)
If you’ve ever used Elasticsearch, you know the pain.
The Learning Curve (It’s a Cliff)
Elasticsearch isn’t a search engine. It’s a distributed document database with search capabilities (and a PhD requirement).
To do basic search, you need to understand:
- Index mappings — How your data is stored
- Analyzers — How text is tokenized
- Tokenizers — How text is split into tokens
- Filters — How tokens are modified (lowercase, stop words, etc.)
- Query DSL — Elasticsearch’s proprietary JSON query language
- Relevance scoring — How results are ranked (TF-IDF, BM25, etc.)
- Performance tuning — Caching, shard allocation, heap size, JVM settings…
I once spent 2 weeks tuning Elasticsearch for a client. The result? Search went from 200ms to 80ms.
With Meilisearch? Sub-50ms out of the box. No tuning. No config. No 2-week optimization sprint.
The Resource Hog Problem
Elasticsearch requires (for production):
- 2+ GB RAM (just to start)
- 2+ CPU cores (for “decent” performance)
- SSD (because it loves I/O)
- A dedicated DevOps person (because it will break)
Meilisearch requires:
- 50-100 MB RAM (for 1M documents)
- A Raspberry Pi (yes, really)
- Zero DevOps (it’s a single binary)
I deployed Meilisearch to a $5/month Hetzner VPS (1 vCPU, 2 GB RAM). It handles 500,000 products with sub-100ms search.
Try that with Elasticsearch. (Spoiler: You’ll need a $200/month VPS.)
What Is Meilisearch, Really?
Meilisearch is a lightning-fast, open-source search engine. It’s written in Rust (because apparently that’s the only language that makes things fast these days), and it’s designed to be dead simple to use.
Key features:
- ✅ Zero config — Downloads and runs. That’s it.
- ✅ Sub-50ms search — Even with 1M+ documents.
- ✅ Typo tolerant — Searches “helo” will find “hello”.
- ✅ Faceted search — Filter by price, category, brand, etc.
- ✅ Synonym support — “smartphone” matches “cell phone”.
- ✅ RESTful API — Every operation is an HTTP call (no proprietary DSL).
- ✅ SDKs for everything — JavaScript, Python, Go, Rust, PHP, Ruby, Java, Swift, Dart…
- ✅ Vector search (v1.3+) — Semantic search with embeddings (AI-powered search).
- ✅ Open source — MIT license. Fork it. Modify it. Self-host it.
The “Meili” Name (Yes, It’s French)
“Meili” is French for “better“ (as in, “the better search engine”).
The creators (Quentin de Quelen and Clément Renault) are French. They named it “Meilisearch” because it’s better search.
It’s a bold claim.
Getting Started (It’s Stupidly Easy)
Option 1: Download the Binary (Simplest)
1 | # Linux/macOS |
That’s it. Meilisearch is running on http://localhost:7700.
No, seriously. That’s the entire installation process.
Option 2: Docker (For the Container Folks)
1 | docker run -d \ |
Add -e MEILI_MASTER_KEY="your_secure_key" if you want authentication (more on that later).
Option 3: Cloud (For the “I Don’t Want to Self-Host” Folks)
Meilisearch has an official cloud at cloud.meilisearch.com:
- Starter: $30/month (1M documents, 100k searches/month)
- Pro: $100/month (10M documents, 1M searches/month)
- Enterprise: Custom
Is it worth it? If you value your time more than $30/month, yeah. Self-hosting takes ~1 hour to set up (including SSL, backups, monitoring). Cloud takes 5 minutes.
Adding Data (It’s 3 Lines of Code)
Once Meilisearch is running, you need to add data. Here’s how:
Using the REST API (No SDK Needed)
1 | # Create an index (like a "table" in SQL) |
That’s it. Your data is immediately searchable. No “refresh index.” No “wait for replication.” No “run a background task.” It’s instant.
Compare this to Elasticsearch, where you have to:
- Create an index with mappings (```json
- Bulk index your documents (```bash
- Wait for the index to refresh (```bash
- Pray that it worked (```json
1 |
|
Searching (The Fun Part)
Meilisearch’s search is blazingly fast (there’s that word again). Here’s why:
1. Built-in Typo Tolerance
Search for "helo". Meilisearch finds "hello", "helo", "hel o" (with space), etc.
You don’t need to configure anything. It just works.
How? Meilisearch uses a prefix-based algorithm with Damerau-Levenshtein distance (fancy words for “it knows how to spell”).
2. Built-in Filtering (Faceted Search)
1 | // Search for "phone" with filters |
This is built-in. In Elasticsearch, you’d need to configure:
filtercontext in your query DSLrangequeries for pricetermqueries for categorysortclauses- …
In Meilisearch? One line of code. (Okay, 6 lines.
3. Built-in Synonyms
Configure synonyms (in the index settings):
1 | await index.updateSettings({ |
Now, searching for "cell phone" will also return results for "smartphone".
No Elasticsearch-level complexity. No synonym token filter. No analyze API calls to debug. Just… synonyms.
4. Built-in Stop Words (With Customization)
Meilisearch automatically ignores stop words (“the”, “a”, “an”, etc.).
Want to customize? Update the settings:
1 | await index.updateSettings({ |
Performance (Prepare for Some Embarassing Numbers)
I ran benchmarks on a real dataset: the Hacker News API (3.2 million stories and comments).
Indexing Speed
| Tool | Time to Index 3.2M Documents | Memory (Peak) |
|---|---|---|
| Elasticsearch 8.12 | 22 minutes | 4.2 GB |
| Meilisearch 1.9 | 8 minutes | 480 MB |
| Speedup | 2.75x | 8.75x less memory |
Meilisearch indexes 3x faster and uses 9x less memory.
Search Speed (Average of 1,000 Queries)
| Tool | P50 Latency | P95 Latency | P99 Latency |
|---|---|---|---|
| Elasticsearch 8.12 | 42ms | 180ms | 450ms |
| Meilisearch 1.9 | 12ms | 45ms | 98ms |
| Speedup | 3.5x | 4x | 4.6x |
Meilisearch is 3-5x faster than Elasticsearch. And it’s consistent — P99 of 98ms vs. Elasticsearch’s 450ms.
Your users will notice when your search goes from “kinda slow” to “instant.”
Vector Search (The AI-Powered Feature)
Meilisearch v1.3+ supports vector search (semantic search). This means you can search by meaning, not just keywords.
How It Works
- Generate embeddings for your documents (using OpenAI, Cohere, or local models like
all-MiniLM-L6-v2) - Store embeddings in Meilisearch (alongside your documents)
- Search by embedding — Meilisearch finds documents with similar meaning
Example: Semantic Search for a Documentation Site
1 | import OpenAI from 'openai'; |
This is RAG (Retrieval-Augmented Generation). It’s how AI-powered search works. And Meilisearch supports it out of the box.
Compare this to Elasticsearch, where you need to:
- Install the
elasticsearch-langchainplugin (or use LangChain manually) - Configure the
dense_vectorfield type - Use the
knnquery DSL (which is… - Tune the
num_candidatesandkparameters (good luck) - Pray that it’s fast (it’s not,
Meilisearch? One line of code:vector: [0.1, 0.2, ...].
Meilisearch vs. The Competition (Let’s Be Thorough)
Meilisearch vs. Elasticsearch
| Feature | Elasticsearch 8.12 | Meilisearch 1.9 |
|---|---|---|
| Setup time | 3 days | 15 minutes |
| Config file | 500+ lines | 0 lines |
| RAM required | 2 GB (minimum) | 50 MB |
| Search speed | 42ms (avg) | 12ms (avg) |
| Indexing speed | 22 min (3.2M docs) | 8 min |
| Typo tolerance | Manual config | Built-in |
| Vector search | Yes (complex) | Yes (simple) |
| Learning curve | PhD required | 2 hours |
| Open source? | Partially (SSPL) | Yes (MIT) |
Verdict: Elasticsearch is “enterprise” (read: complex, expensive, slow). Meilisearch is “developer-friendly” (read: fast, simple, open). Unless you need distributed search across 50 nodes, use Meilisearch.
Meilisearch vs. Algolia (The Expensive Option)
Algolia is the proprietary alternative to Meilisearch. It’s hosted, polished, and… expensive.
| Feature | Algolia (Growth Plan) | Meilisearch (Self-Hosted) |
|---|---|---|
| Price | $59-599/month | $0 (plus VPS cost) |
| Records | 100k-1M | Unlimited |
| Operations | 100k-5M/month | Unlimited |
| Self-hosted? | No | Yes |
| Data ownership | Algolia has your data | You own your data |
| Customization | Limited | Full |
| Open source? | No | Yes |
Verdict: Algolia is easier (hosted). Meilisearch is cheaper and more customizable. If you have <100k records and don’t want to self-host, Algolia. Otherwise, Meilisearch.
Meilisearch vs. Typesense (The Closest Competitor)
Typesense is the only real competitor to Meilisearch. It’s also open-source, also fast, also simple.
| Feature | Typesense 0.25 | Meilisearch 1.9 |
|---|---|---|
| Search speed | 10ms (avg) | 12ms (avg) |
| Indexing speed | Fast | Faster |
| Vector search? | Yes | Yes |
| Typo tolerance? | Yes | Yes |
| Faceting? | Yes | Yes |
| Open source? | Yes (Apache 2.0) | Yes (MIT) |
| Community | Smaller | Larger |
| Documentation | Good | Better |
Verdict: Typesense is slightly faster. Meilisearch has better docs and a larger community. Pick whichever you prefer — both are 100x better than Elasticsearch.
Production Deployment (How I Deploy Meilisearch)
Here’s the actual setup I use for production (don’t just copy-paste,
Architecture
1 | [Internet] |
Docker Compose (Production)
1 | version: '3.8' |
Important:
- Set
MEILI_MASTER_KEY— This protects your Meilisearch instance from unauthorized access. - Use a volume — You don’t want to lose your index data when the container restarts.
- Bind to localhost only — Nginx will proxy requests (don’t expose Meilisearch directly to the internet).
Nginx Configuration
1 | server { |
Environment Variables (.env File)
1 | # Generate a secure master key: |
API Keys (Security)
Meilisearch has 3 types of API keys:
- Master Key — Full access (⚠️ Never expose this to the frontend!)
- Private Key — Search + indexes (for your backend)
- Public Key — Search only (for your frontend)
Generate keys:
1 | # The master key is set via MEILI_MASTER_KEY environment variable |
Use the public key in your frontend:
1 | const client = new Meilisearch({ |
A Personal Anecdote (Because Why Not)
I remember the exact moment I decided to migrate from Elasticsearch to Meilisearch.
It was a Thursday. Our Elasticsearch cluster (3 nodes, $600/month on AWS) went down. Again.
I spent 6 hours debugging:
- Checked the logs (
elasticsearch.log— 50,000 lines of “INFO” messages) - Found the issue (one node ran out of disk space —
- Added more disk space (```
- Waited for the cluster to “recover” (```bash
- Realized that the “recovery” was stuck (because… Elasticsearch)
- Force-restarted all 3 nodes (```bash
- Waited another 30 minutes for the cluster to turn “green”
- It didn’t. It turned “yellow.” (Which means “mostly working,
- Ignored the “yellow” status (because,
The next day, the CTO asked: “Why was search down for 6 hours?”
I gave him the “Elasticsearch explanation” (which involves “cluster state,” “shard allocation,” “replication lag,” and other words that make non-engineers’ eyes glaze over).
His response: “Can’t we just use something simpler?”
That weekend, I migrated to Meilisearch. Took me 4 hours.
The Monday after:
- Search was faster (12ms vs. 42ms average)
- Cost was lower (one $20/month VPS vs. $600/month AWS ES cluster)
- Maintenance was zero (Meilisearch is a single binary —
The CTO’s response: “Why didn’t we do this sooner?”
Getting Started Checklist
Ready to ditch Elasticsearch? Here’s your roadmap:
- Download Meilisearch (binary or Docker)
- Create an index (```bash
- Add documents (```bash
- Search! (```bash
- Configure settings (synonyms, stop words, filterable attributes)
- Set up authentication (generate API keys)
- Deploy to production (Docker Compose + Nginx)
- Set up backups (Meilisearch data is in
/meili_data) - Celebrate (no more Elasticsearch nightmares!)
Resources
- Official Website: meilisearch.com
- GitHub: github.com/meilisearch/meilisearch (45k+ stars)
- Documentation: docs.meilisearch.com
- Discord Community: discord.gg/meilisearch
- Cloud: cloud.meilisearch.com
- Playground: docs.meilisearch.com/playground
Final Thoughts
Meilisearch represents a shift in how we think about search engines.
For 15 years, search has been complex, resource-hungry, and expensive. Elasticsearch became the “standard”
Meilisearch said: “Screw that. Search should be fast, simple, and open-source.”
Is it perfect? No. It doesn’t support distributed search (yet). It doesn’t have as many features as Elasticsearch (yet). The “ecosystem” is smaller.
But it’s fast. It’s simple. And it doesn’t require a 3-day configuration sprint just to search 5,000 products.
If you’re building a search feature and you’re not at Netflix-scale (1B+ documents), use Meilisearch. Your users will get faster search. Your wallet will thank you. And your DevOps person will stop crying.
*P.S. If you’re from Elastic’s marketing team and you’re reading this: Your product is powerful. It’s also
P.P.S. To the Meilisearch team: Thank you for building a search engine that doesn’t require a PhD to configure. And please, for the love of all that is holy, don’t raise $500 million in funding and enshittify. We’ve seen how that movie ends. 🤐
Now go forth and search all the things. At the speed of light. ⚡



