Meilisearch Project Structure

The lightning-fast, open-source search engine. A Rust application built on top of LMDB that prioritizes speed and developer experience.

Updated 2025-12-30

#meilisearch #rust #search-engine #lmdb #actix-web
PNGPDF

Project Directory

meilisearch/
crates/
Cargo Workspace
meilisearch/
HTTP Server (Actix-web)
src/
Cargo.toml
milli/
Core Search Engine
src/
Cargo.toml
index-scheduler/
Async Task Queue
file-store/
Update file management
Cargo.toml
Workspace config
Dockerfile
Container image

Repository Info

Tech Stack

  • Language-Rust
  • Web Framework-Actix-web
  • Storage Engine-LMDB (via heed)
  • Core Library-milli
  • Architecture-Monolith (Workspace)

Architecture Notes

Meilisearch is structured as a Cargo Workspace containing multiple crates. The most important separation is between meilisearch (the HTTP server) and milli (the search library). milli is the brain that interacts with LMDB to perform indexing and search. index-scheduler handles the asynchronous processing of document updates, ensuring that write operations don't block read operations.

Key Directories

  • crates/milli/-The heart of Meilisearch. It contains the logic for tokenization, ranking rules (typo tolerance, proximity), and LMDB interaction.
  • crates/meilisearch/-The API layer. It defines the routes, authentication middleware, and connects the HTTP requests to the index-scheduler and milli.
  • crates/index-scheduler/-Manages the queue of tasks (document additions, settings updates). It batches updates to optimize write performance.

Why This Structure?

Meilisearch shows how to build high-performance systems in Rust. By using memory-mapped files (LMDB), it achieves incredible read speeds while keeping memory usage predictable. The separation of milli allows the core engine to be reused or tested in isolation from the web server.

Share this template

Related Templates

© 2025 FolderStructure.dev