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.

Not the right match-up?
FeatureLunr.jsToshi
Deploy effortRead-the-docs projectUnder-an-hour setup
Health score29 · At risk79 · Good
CategorySearch EnginesSearch Engines
LicenseMITMIT
LanguageJavaScriptRust
Setup difficultyEasyMedium
Min. RAM64 MB256 MB
Deploymentsourcedocker, binary
GitHub stars★ 9,203★ 4,256
First released20132018
ReplacesAlgolia, ElasticsearchElasticsearch

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

Read the full Toshi guide →

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
Lunr.js details

Choose Toshi if…

  • Lightweight search server
  • Familiar API style

Watch out for

  • Less mature than ES
  • Smaller feature set
Toshi details

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.

Related comparisons