Meilisearch
A fast, open-source search engine that is easy to deploy and integrate — delivers typo-tolerant, relevance-ranked results in under 50ms.
Meilisearch is a fast, open-source search engine written in Rust, designed to be easy to deploy, integrate, and use. It delivers typo-tolerant, relevance-ranked full-text search results in under 50 milliseconds, and can be embedded in any application via a clean REST API. It is a popular self-hosted alternative to Algolia.
Features
- Blazing fast — returns search results in under 50ms, even on large datasets, thanks to its Rust core and in-memory index
- Typo tolerance — handles misspellings gracefully out of the box; no configuration required
- Faceted search and filtering — define filterable and facetable attributes to let users drill down into results
- Geo search — filter and sort results by geographic distance from a point
- Synonyms — define word equivalents so searching for "car" also finds "automobile"
- Custom ranking — fully configurable relevance ranking pipeline; tune how results are sorted to match your use case
- Multi-language — strong support for language-specific tokenization across Latin, CJK, Arabic, and many other scripts
- Multi-search — run multiple searches in a single HTTP request to reduce round trips
- Hybrid search — combine keyword and vector (semantic) search in a single query
- Tenant tokens — generate scoped API keys that restrict which documents a given user can search, for multi-tenant applications
- Single binary — ships as a standalone binary with no external dependencies; runs on Linux, macOS, and Windows
Installation
Download a pre-built binary from the releases page:
# macOS / Linux (install script — works on all Linux distros including Debian and Fedora)
curl -L https://install.meilisearch.com | sh
# macOS (Homebrew)
brew install meilisearch
# Docker
docker pull getmeili/meilisearch:latest
# cargo
cargo install meilisearchStarting the server
# Start with default settings (listens on http://localhost:7700)
./meilisearch
# Set a master key for authentication (required in production)
./meilisearch --master-key="your-master-key"
# Specify a custom data directory and port
./meilisearch --db-path ./data --http-addr 0.0.0.0:7700Quick start via REST API
# Add documents to an index (index is created automatically)
curl -X POST 'http://localhost:7700/indexes/movies/documents' \
-H 'Content-Type: application/json' \
--data-binary '[
{ "id": 1, "title": "The Shawshank Redemption", "genres": ["Drama"] },
{ "id": 2, "title": "The Godfather", "genres": ["Drama", "Crime"] },
{ "id": 3, "title": "Pulp Fiction", "genres": ["Crime", "Drama"] }
]'
# Search
curl 'http://localhost:7700/indexes/movies/search?q=godfater'
# Returns "The Godfather" despite the typoConfiguration
Meilisearch exposes index settings via the API to control ranking, filtering, and display:
# Define filterable attributes
curl -X PATCH 'http://localhost:7700/indexes/movies/settings' \
-H 'Content-Type: application/json' \
--data-binary '{
"filterableAttributes": ["genres", "year"],
"sortableAttributes": ["year", "rating"],
"searchableAttributes": ["title", "overview", "cast"],
"rankingRules": [
"words", "typo", "proximity", "attribute", "sort", "exactness"
],
"synonyms": {
"car": ["automobile", "vehicle"],
"movie": ["film", "picture"]
}
}'Filtering and sorting
# Search with a filter
curl 'http://localhost:7700/indexes/movies/search' \
-H 'Content-Type: application/json' \
--data-binary '{
"q": "action",
"filter": "genres = Action AND year > 2000",
"sort": ["rating:desc"],
"limit": 10,
"offset": 0
}'Official client libraries
Meilisearch provides officially maintained clients for most major languages:
# JavaScript / TypeScript
npm install meilisearch
# Python
pip install meilisearch
# Rust
cargo add meilisearch-sdkimport { MeiliSearch } from "meilisearch";
const client = new MeiliSearch({ host: "http://localhost:7700" });
const index = client.index("movies");
const results = await index.search("pulp ficton", {
filter: "genres = Crime",
limit: 5,
});
console.log(results.hits);Hybrid / vector search
Meilisearch supports embedding vectors alongside documents for semantic search:
# Configure an embedder (using OpenAI in this example)
curl -X PATCH 'http://localhost:7700/indexes/movies/settings/embedders' \
-H 'Content-Type: application/json' \
--data-binary '{
"default": {
"source": "openAi",
"apiKey": "sk-...",
"model": "text-embedding-3-small",
"documentTemplate": "{{doc.title}}: {{doc.overview}}"
}
}'
# Hybrid search (combines keyword + semantic scoring)
curl 'http://localhost:7700/indexes/movies/search' \
-H 'Content-Type: application/json' \
--data-binary '{
"q": "a story about redemption in prison",
"hybrid": { "semanticRatio": 0.5, "embedder": "default" }
}'Why Meilisearch over Elasticsearch?
Meilisearch trades Elasticsearch's enormous feature surface for simplicity and speed. It starts in seconds, requires no cluster management, JVM tuning, or index mapping expertise, and returns results fast enough to power interactive search-as-you-type interfaces. For applications that need full-text search with typo tolerance, faceting, and geo capabilities — without the operational overhead of Elasticsearch — Meilisearch is an excellent fit.