SaaS stacks
Yui Tanaka7 min read10 views

Meilisearch vs Typesense vs Elasticsearch: open-source search for your Next.js SaaS (2026)

Meilisearch, Typesense, and Elasticsearch for search in a Next.js SaaS in 2026: where the engine runs, the license ceiling, and honest where-each-loses, with real repos and costs.

Updated on July 26, 2026

Three stylized objects on a warm beige desk, a small magnifying lens over a glowing card, a rotary card-file mid-spin, and a tall terracotta card-catalog cabinet, representing lightweight, fast, and heavyweight open-source search engines.
Three stylized objects on a warm beige desk, a small magnifying lens over a glowing card, a rotary card-file mid-spin, and a tall terracotta card-catalog cabinet, representing lightweight, fast, and heavyweight open-source search engines.
On this page

Quick answer (2026): For a user-facing search box in a Next.js SaaS, reach for Meilisearch (MIT, Rust, one binary) or Typesense (GPL-3.0, C++, one binary). Both are typo-tolerant, answer in tens of milliseconds, and ship an InstantSearch adapter, so you can wire real search in an afternoon. Reach for Elasticsearch (triple-licensed, Java, clustered) only when search is one job among several, think log analytics, heavy aggregations, or large-scale vector and RAG workloads, and you can carry the JVM operations weight. Meilisearch has the most permissive license and the gentlest start. Typesense trades a copyleft license for excellent relevance and RAM-first speed. Elasticsearch is the engine you grow into, not the one you start with.

We keep the ShipGarden gallery honest by running the same job through each tool: index a few thousand product or document records, put a fast search box on a Next.js app, and see what breaks. Here is where the three big open-source contenders actually differ in 2026.

At a glance (2026)

Scroll to see more

EngineStarsLicenseWritten inLatestBest fit
Meilisearch logo Meilisearch58.7kMIT (core)Rustv1.50.0 (Jul 2026)Fastest path to a real search box
Typesense logo Typesense26.4kGPL-3.0C++v31 line (2026)Relevance-first, RAM-first search
Elasticsearch logo Elasticsearch77.6kAGPL-3.0 / ELv2 / SSPLJava9.x line (2026)Search plus analytics at scale

Star counts, licenses, and versions were read from each project's GitHub repository in July 2026: Meilisearch, Typesense, and Elasticsearch.

Where the decision actually forks

Generic listicles rank these on a feature grid and call it a day. That grid hides the three questions that actually decide the pick for a small Next.js team.

1. Where the engine runs

This is the real fork. Meilisearch and Typesense are each a single self-contained binary (a Rust process and a C++ process, respectively). You run one container, point it at a data volume, and you have search. Elasticsearch is a JVM application designed to run as a cluster: heap tuning, node roles, and shard management are part of the job, not an afterthought. For a Next.js SaaS whose search box needs to find products, docs, or users, the single-binary engines remove an entire operations surface. Elasticsearch earns that surface back only when you also need it to be your logging and analytics backbone.

2. The license ceiling

Meilisearch's core is MIT, the most permissive of the three, so you can self-host, modify, and ship around it without copyleft obligations. Typesense is GPL-3.0: running it as an unmodified backend service for your SaaS is fine, but if you distribute a modified Typesense binary, the copyleft terms apply, so read them before you fork it. Elasticsearch is the interesting one. After the 2021 relicense away from Apache 2.0, Elastic added the OSI-approved AGPLv3 as a source-code option in September 2024, alongside the Elastic License 2.0 (the default) and SSPL, per Elastic's own licensing FAQ. The practical catch: the default ELv2 forbids offering Elasticsearch as a managed service, which matters if your product itself resells search.

3. Search experience out of the box

Meilisearch and Typesense were both built for one thing: instant, typo-tolerant, as-you-type search for end users. Fuzzy matching, prefix search, and faceting are on by default, and both publish adapters for the InstantSearch UI libraries, so the front-end is mostly configuration. Elasticsearch can do all of this and far more, but a good product search box on top of it is something you assemble and tune (analyzers, mappings, relevance scoring) rather than switch on. More power, more knobs.

Meilisearch logo Meilisearch (58.7k stars in July 2026) bills itself as "a lightning-fast search engine API bringing AI-powered hybrid search to your sites and applications." It is a single Rust binary with a clean REST API, sane defaults, and, as of the v1.x line in 2026, built-in hybrid (keyword plus vector) search for semantic use cases. Time-to-first-useful-result is the shortest of the three: index some JSON, hit the search endpoint, done.

Where Meilisearch loses: it is deliberately opinionated. If you need deep, custom relevance pipelines, complex nested aggregations, or the kind of analytics queries Elasticsearch eats for breakfast, you will feel the ceiling. Very large indexes are also more memory-hungry than the marketing suggests, so budget RAM for anything past a few million documents.

Typesense: relevance-first, RAM-first

Typesense logo Typesense (26.4k stars, GPL-3.0, July 2026) describes itself as an "open source alternative to Algolia and an easier-to-use alternative to Elasticsearch." It is a C++ engine that keeps its index in memory, which is exactly why its typo-tolerant queries come back so fast, and it ships first-class relevance controls and an Algolia logo Algolia-compatible feel without Algolia's per-search pricing. Typesense Cloud runs the same engine as a managed service if you would rather not host it.

Where Typesense loses: the in-memory design is a hard cost. Your entire index has to fit in RAM (with headroom), so a large corpus gets expensive fast, and it is less forgiving than a disk-backed engine when data outgrows the box. The GPL-3.0 license is also a conversation some legal teams want to have, even though using it as a backend service is fine.

Elasticsearch: the engine you grow into

Elasticsearch logo Elasticsearch (77.6k stars in July 2026) is the "distributed, RESTful search engine" that half the internet's logging runs on. It is a genuine search-and-analytics platform: full-text, aggregations, mature vector search for RAG, and horizontal scale that the other two cannot match. If search is going to be one of several data jobs (product search plus observability plus analytics), consolidating on Elasticsearch is a defensible call.

Where Elasticsearch loses: the operations weight. Running a healthy JVM cluster is real work, and for a two-person team that just wants a search box, it is almost always more than the job needs. The licensing story, while improved by the 2024 AGPL option, is still three licenses you have to reason about instead of one. Starting here is over-provisioning.

How each plugs into a Next.js app

All three expose a REST or JavaScript-client interface, so the integration pattern is the same and it matters for security. Do the indexing and any privileged queries from a Route Handler or server action using an admin API key that never leaves the server. For the front-end search box, issue a scoped search-only key that can read but not write, and only that key touches the browser. Meilisearch and Typesense both make search-only keys and InstantSearch wiring a first-class path, which is why they feel so quick to ship on the App Router.

One more thing teams forget: your search index is a denormalized mirror of records that still live in your primary database, so pick that first. If you are still choosing the Postgres side of the stack, our Neon vs Supabase comparison covers the serverless-Postgres trade-offs, and search slots in next to it. Search is just one row in the larger picture; the full open-source Next.js SaaS starter scorecard shows where it sits.

So which one?

  • Building a product search box and want it live this week: Meilisearch. Most permissive license, gentlest start, hybrid search built in.
  • Care most about relevance quality and want an Algolia-style experience you own: Typesense, as long as your index fits comfortably in RAM.
  • Search is one of several data jobs and you already run infrastructure: Elasticsearch, and only then.

For most small Next.js teams shipping a search feature (not a search company), the honest answer in 2026 is one of the two single-binary engines. Elasticsearch is the tool you adopt when the problem has grown past a search box, not before.

Your move: index a thousand of your real records into Meilisearch and Typesense side by side this afternoon, and let the relevance of your own data, not a feature grid, make the call.

Yui Tanaka

Written by

Yui Tanaka

Yui Tanaka curates the ShipGarden gallery, road-testing open-source and source-available SaaS and AI boilerplates and the infrastructure they run on. She writes about time-to-first-deploy, cost, and vendor lock-in for small teams.

Frequently asked questions

Which is the best open-source search engine for a Next.js app in 2026?

For a user-facing search box, Meilisearch or Typesense: both are single self-contained binaries, typo-tolerant by default, answer in tens of milliseconds, and ship InstantSearch adapters. Meilisearch has the most permissive license (MIT) and the easiest start; Typesense leans on relevance quality and RAM-first speed. Choose Elasticsearch only when search sits alongside heavier jobs like log analytics or large-scale vector search.

Is Meilisearch or Typesense faster?

Both answer typo-tolerant queries in tens of milliseconds, so for a typical product or docs search box the difference is rarely what you will notice first. Typesense keeps its whole index in memory, which is why its worst-case latency stays low but forces the index to fit in RAM. Meilisearch is also fast and tends to be lighter to operate at small to mid scale. Benchmark on your own data rather than trusting either vendor's numbers.

Does Typesense's GPL-3.0 license affect my SaaS?

Running an unmodified Typesense binary as the search backend for your SaaS does not trigger copyleft obligations on your application code. The GPL-3.0 terms come into play if you distribute a modified version of Typesense itself. Meilisearch's MIT core avoids that conversation entirely, which is why it is the simplest license of the three for most teams.

Is Elasticsearch still open source in 2026?

Yes, with nuance. After moving away from Apache 2.0 in 2021, Elastic added the OSI-approved AGPLv3 as a source-code license option in September 2024, alongside the default Elastic License 2.0 and SSPL. The source is available under AGPLv3, but the default ELv2 distribution restricts offering Elasticsearch as a managed service. Check Elastic's licensing FAQ before you build a product that resells search.

Can I run these search engines on serverless or Vercel?

Not the engine itself. Meilisearch, Typesense, and Elasticsearch are long-running stateful services, so they live on a container host, a VM, or the vendor's managed cloud, not inside a serverless function. Your Next.js app on Vercel talks to them over HTTP: index and run privileged queries from a Route Handler with an admin key, and expose only a scoped search-only key to the browser.