Elasticsearch needs a cluster, configuration files, and a DevOps degree. Algolia charges per search. Meilisearch gives you instant, typo-tolerant search in one binary — curl localhost:7700 and it works.
What Meilisearch Gives You for Free
- Instant results — <50ms search responses
- Typo-tolerant — "javscript" finds "javascript"
- Faceted search — filter by category, price, date
- Geo search — find items near a location
- Multi-index — search across multiple collections
- RESTful API — simple HTTP endpoints
- Client SDKs — JavaScript, Python, Ruby, Go, Rust, PHP
- Docker or binary — no Java, no config files
Quick Start
# Docker
docker run -p 7700:7700 getmeili/meilisearch
# Or binary
curl -L https://install.meilisearch.com | sh
./meilisearch
Add Documents
import { MeiliSearch } from 'meilisearch';
const client = new MeiliSearch({ host: 'http://localhost:7700' });
await client.index('products').addDocuments([
{ id: 1, name: 'MacBook Pro', category: 'laptops', price: 1999 },
{ id: 2, name: 'iPhone 15', category: 'phones', price: 999 },
{ id: 3, name: 'AirPods Pro', category: 'audio', price: 249 },
{ id: 4, name: 'iPad Air', category: 'tablets', price: 599 },
]);
Search (Instant, Typo-Tolerant)
// Exact match
const results = await client.index('products').search('macbook');
// → [{ name: 'MacBook Pro', ... }]
// Typo-tolerant
const typo = await client.index('products').search('ipohne');
// → [{ name: 'iPhone 15', ... }]
// With filters
const filtered = await client.index('products').search('', {
filter: 'category = phones AND price < 1500',
sort: ['price:asc'],
limit: 10
});
Faceted Search
// Configure filterable attributes
await client.index('products').updateFilterableAttributes([
'category', 'price', 'brand'
]);
// Search with facets
const results = await client.index('products').search('laptop', {
facets: ['category', 'brand'],
filter: 'price < 2000'
});
console.log(results.facetDistribution);
// { category: { laptops: 5, tablets: 2 }, brand: { apple: 3, dell: 2 } }
React Integration
import { InstantSearch, SearchBox, Hits } from 'react-instantsearch';
import { instantMeiliSearch } from '@meilisearch/instant-meilisearch';
const { searchClient } = instantMeiliSearch('http://localhost:7700');
function Search() {
return (
<InstantSearch searchClient={searchClient} indexName="products">
<SearchBox />
<Hits hitComponent={Hit} />
</InstantSearch>
);
}
Meilisearch vs Algolia vs Elasticsearch vs Typesense
| Feature | Meilisearch | Algolia | Elasticsearch | Typesense |
|---|---|---|---|---|
| Price | Free (self-hosted) | $1/1K searches | Self-hosted | Free (self-hosted) |
| Setup | 30 seconds | SaaS | 30+ minutes | 5 minutes |
| Typo tolerance | Built-in | Built-in | Manual config | Built-in |
| Faceted search | Built-in | Built-in | Manual | Built-in |
| Binary size | ~60MB | SaaS | 500MB+ | ~30MB |
| Memory usage | Low | SaaS | High | Low |
| Learning curve | 5 min | 10 min | Hours | 5 min |
The Verdict
Meilisearch is search for developers who hate configuring Elasticsearch. One binary, instant results, typo-tolerance — all working in 30 seconds. If you need search in your app, start here.
Need help building production web scrapers or data pipelines? I build custom solutions. Reach out: spinov001@gmail.com
Check out my awesome-web-scraping collection — 400+ tools for extracting web data.
Top comments (0)