Meilisearch is a fast, typo-tolerant full-text search engine with a simple REST API.
It provides instant search results, faceted filtering, and relevancy tuning out of the box.
flowchart LR
App([Application]) -->|:7700| Meili[Meilisearch API]
Meili --> Index[(Indexes / Documents)]
User([User]) -->|search query| Meili
Meili --> Results[Instant Results]
- Applications index documents by sending JSON payloads to the REST API.
- Meilisearch builds optimized search indexes for instant retrieval.
- Search queries return ranked, typo-tolerant results in milliseconds.
- Faceted search, filtering, and sorting are supported natively.
- Image:
getmeili/meilisearch:v1.9 - Container name:
meilisearch - API endpoint:
http://<host-ip>:7700 - Persistent data:
meili_data:/meili_data
Set via .env (copy from .env.example):
MEILI_PORT(default:7700)MEILI_MASTER_KEY(default:changeme) — API key for authenticationMEILI_ENV(default:development) — set toproductionto enforce key auth
From the repository root:
cd meilisearch
cp .env.example .env
docker compose up -dTest the API:
# Check health
curl http://localhost:7700/health
# Create an index and add documents
curl -X POST http://localhost:7700/indexes/movies/documents \
-H "Authorization: Bearer changeme" \
-H "Content-Type: application/json" \
--data-binary '[
{"id": 1, "title": "The Matrix", "genre": "sci-fi"},
{"id": 2, "title": "Inception", "genre": "sci-fi"},
{"id": 3, "title": "Interstellar", "genre": "sci-fi"}
]'
# Search
curl "http://localhost:7700/indexes/movies/search?q=matrx" \
-H "Authorization: Bearer changeme"Useful commands:
docker compose ps
docker compose logs -f
docker compose restart
docker compose down- Sample data is seeded automatically on
docker compose up(theseedcontainer indexes movies and exits). - Run manual searches after startup:
# Search with typo tolerance
curl "http://localhost:7700/indexes/movies/search" \
-H "Authorization: Bearer changeme" \
-H "Content-Type: application/json" \
-d '{"q": "interstllar"}'
# Filter by genre
curl "http://localhost:7700/indexes/movies/search" \
-H "Authorization: Bearer changeme" \
-H "Content-Type: application/json" \
-d '{"q": "", "filter": "genre = action"}'- Use the SDKs (JavaScript, Python, Go, PHP, etc.) for easy integration.
- Configure searchable attributes, ranking rules, and stop words per index.
- Enable faceted search for category/filter UIs.
- Use
MEILI_ENV=productionin production to require API key authentication on all endpoints.
- Change the default master key before exposing externally.
- In development mode, the API is accessible without authentication for convenience.
- Data persists across restarts via the
meili_datavolume. - See Meilisearch docs for full API and configuration reference.