Lunr.js vs Toshi
A side-by-side comparison of two self-hosted search engines options — licensing, setup difficulty, resource needs, and what each one replaces.
| Feature | Lunr.js | Toshi |
|---|---|---|
| Deploy effort | Read-the-docs project | Under-an-hour setup |
| Health score | 29 · At risk | 79 · Good |
| Category | Search Engines | Search Engines |
| License | MIT | MIT |
| Language | JavaScript | Rust |
| Setup difficulty | Easy | Medium |
| Min. RAM | 64 MB | 256 MB |
| Deployment | source | docker, binary |
| GitHub stars | ★ 9,203 | ★ 4,256 |
| First released | 2013 | 2018 |
| Replaces | Algolia, Elasticsearch | Elasticsearch |
What are Lunr.js and Toshi?
Lunr.js
Lunr.js is a small, full-text search library for use in the browser that provides a simple search index without needing a backend service. It is commonly used to add offline search to static sites and documentation.
- Browser-based search
- No backend needed
- Prebuilt index support
- Tiny library size
Toshi
Toshi is a self-hosted full-text search server that exposes an Elasticsearch-like JSON REST API on top of the Tantivy search engine. It targets developers who want a simple, fast search service in Rust.
- JSON REST API
- Tantivy-backed indexing
- Fast Rust core
- Simple to run
Lunr.js vs Toshi: key differences
Lunr.js is written in JavaScript, while Toshi is built with Rust. Lunr.js is the lighter option, starting around 64 MB of RAM against 256 MB for Toshi. Lunr.js is the more established project (first released 2013), while Toshi arrived in 2018. Lunr.js has the considerably larger community, at 9,203 GitHub stars versus 4,256. Toshi lists first-class Docker deployment; Lunr.js does not.
Why pick each one
Choose Lunr.js if…
- Released under the MIT license
- Easy to set up — beginner-friendly
- Mature project with 9.2k GitHub stars
- Written in JavaScript
Choose Toshi if…
- Lightweight search server
- Familiar API style
Watch out for
- Less mature than ES
- Smaller feature set
Frequently asked questions
Is Lunr.js or Toshi better?
Lunr.js is the stronger all-round pick: it has both the larger community and the simpler easy setup. Consider Toshi if its specific feature set fits your needs better.
Are Lunr.js and Toshi free and open-source?
Yes. Lunr.js is licensed under MIT and Toshi under MIT. Both can be self-hosted at no software cost.
Can I run Lunr.js and Toshi with Docker?
Lunr.js: check the project docs for container support. Toshi: yes.
Which is lighter on resources, Lunr.js or Toshi?
Lunr.js has the smaller minimum footprint at 64 MB of RAM, compared to about 256 MB for Toshi. Real-world usage depends on library size, user count, and enabled features.