Typesense: Open-Source Typo-Tolerant Search Engine
GitHub Repo
GPL-3.0
October 18, 2026 at 03:20 PM
0 views

Typesense: Open-Source Typo-Tolerant Search Engine

@typesenseProject Author

What Typesense is

Typesense is an open-source search engine that describes itself as fast and typo-tolerant, built for developers who want to add a polished search box, faceted browsing or semantic search to an application without running a large search cluster. The README positions it as an open-source alternative to Algolia and as an easier-to-use alternative to Elasticsearch. The server is written in C++ and ships as a single binary with no runtime dependencies, so the same command that starts it on a laptop can start it in production.

The project targets application search rather than log analytics. You define collections with a schema, send JSON documents over a REST API, and query them with parameters for the fields to search, filters, sort order and facets. Typo tolerance is on by default, which is the feature the project leads with: a query for stork still finds a company called Stark Industries in the README quick start. On top of classic keyword search, it supports vector search, hybrid search, built-in embedding models and a conversational search mode that answers questions from indexed data.

It suits product teams building e-commerce search, documentation search, directories, SaaS dashboards and any interface where search-as-you-type latency matters. The README lists live demos that search 32 million songs from MusicBrainz, 28 million books from OpenLibrary, 2 million recipes and 1 million Linux kernel commit messages.

How Typesense works

Typesense keeps its search indices in memory and is built in C++ for low latency; the README says it is architected for instant searches under 50 ms. Data is organised into collections, which are roughly equivalent to indices. Each collection has a schema that declares field names and types, which fields can be faceted, and an optional default sorting field. Documents are plain JSON and are added, updated and searched through an HTTP API on port 8108 by default, protected by an API key passed at startup.

Most search behaviour is set at query time rather than at index creation. The README highlights this as a key difference from Algolia: fields to search, facets, grouping and ranking settings can be passed as query parameters, and sorting by different fields works on a single index instead of requiring a replica index per sort order. That keeps memory use down and lets one collection serve several UI views.

For high availability, Typesense supports Raft-based clustering, so several nodes form a replicated cluster. The official API clients include a retry strategy designed to work against such a cluster. Upgrades, according to the README, are a matter of swapping the binary and restarting the process.

On memory, the FAQ gives some reference points: a fresh server uses about 30 MB, and indexing 1 million Hacker News titles with their points used 165 MB, against 88 MB for the same data as JSON on disk. Actual usage depends on the number and type of indexed fields.

Key features

  • Typo tolerance: handles misspelled queries out of the box, without configuration.
  • Tunable ranking and dynamic sorting: tailor relevance and sort by any field at query time, for example price ascending.
  • Faceting, filtering, grouping and distinct: drill-down navigation and grouped results for more variety on a results page.
  • Federated search: query several collections in a single HTTP request.
  • Geo search: search and sort around a latitude and longitude or within a bounding box.
  • Vector search: index embeddings from your own models and run nearest-neighbour queries for similarity search, semantic search or recommendations.
  • Semantic and hybrid search: generate embeddings inside Typesense with built-in models such as S-BERT and E-5, or call OpenAI or PaLM APIs, and combine semantic and keyword search.
  • Conversational search: a built-in RAG mode that answers questions in full sentences based on the indexed data.
  • Natural language search: LLM-powered query understanding that turns free-form phrases into structured filters, sorts and queries.
  • Image and voice search: search images by text description using the CLIP model, and transcribe spoken queries with Whisper.
  • Scoped API keys: keys restricted to certain records, intended for multi-tenant applications.
  • JOINs: connect collections through reference fields and join them at query time.
  • Synonyms and curation: define equivalent terms and pin specific records to fixed positions for merchandising.

Getting started with Typesense

The README offers three install routes: binary packages for Linux (x86_64 and arm64) and macOS (x86_64), the official Docker image, or a managed cluster on Typesense Cloud. The quick start starts the server with Docker:

docker run -p 8108:8108 -v/tmp/data:/data typesense/typesense:29.0 --data-dir /data --api-key=Hu52dwsas2AdxdE

It then installs the Python client:

pip install typesense

The client is initialised with the API key and node address, and a companies collection is created with a schema:

import typesense
client = typesense.Client({
  'api_key': 'Hu52dwsas2AdxdE',
  'nodes': [{
    'host': 'localhost',
    'port': '8108',
    'protocol': 'http'
  }],
  'connection_timeout_seconds': 2
})

After adding a document, the README searches with a deliberate typo and a numeric filter:

search_parameters = {
  'q'         : 'stork',
  'query_by'  : 'company_name',
  'filter_by' : 'num_employees:>100',
  'sort_by'   : 'num_employees:desc'
}
client.collections['companies'].documents.search(search_parameters)

Official clients exist for JavaScript, PHP, Python and Ruby, with Go, Java, Swift, Dart, Rust, .NET, Elixir and others listed as community or additional clients. Framework integrations cover Laravel, Firebase, Gatsby, WordPress, WooCommerce, Symfony, Docusaurus and DocSearch, and an InstantSearch.js adapter provides ready-made search UI components. To build from source, the project uses Bazel:

bazel build //:typesense-server

The build needs a C++11 compiler plus Snappy, zlib, OpenSSL, curl and ICU, and the README notes that the first build takes a while because third-party libraries are pulled and built.

Use cases

  • E-commerce and catalog search: faceted filters, sorting by price, curation of promoted products and typo-tolerant search-as-you-type.
  • Documentation and content search: the DocSearch and Docusaurus integrations index docs sites, and federated search spans several content types at once.
  • Multi-tenant SaaS search: scoped API keys limit each tenant to its own records without a separate index per customer.
  • Semantic search and RAG over your data: built-in embeddings, hybrid search and conversational search keep keyword and AI search in one service.
  • Location-aware listings: geo search for store finders, rentals or delivery areas.

How Typesense compares

The README addresses the two comparisons people ask about most. Against Elasticsearch, it argues that Elasticsearch suits large teams storing billions of documents and petabytes of data such as logs, with thousands of configuration parameters and JVM tuning to manage. Typesense instead aims at shortening the time to a good search experience, with smart defaults and a single native binary.

Against Algolia, the README describes Algolia as a proprietary hosted service and says Typesense is closer to it in spirit than to Elasticsearch, while letting you self-host or use Typesense Cloud, which charges a fixed hourly cluster cost plus bandwidth rather than per record or per search. It also states plainly what Typesense lacks compared with Algolia: personalization and server-side search analytics. The project links a side-by-side comparison that also includes Meilisearch.

Things to know before adopting Typesense

  • License: the server is GPL-3.0. The FAQ explains that GPL obligations apply when you distribute a modified server, not when you run it as a separate daemon or modify it for internal use. The official client libraries are Apache-licensed.
  • Memory-bound design: indices live in RAM, so size servers for your dataset. The README's own benchmark puts 28 million books at about 14 GB of RAM.
  • Benchmarks are the project's own: the README reports, for example, 104 concurrent searches per second at an 11 ms average on 2.2 million recipes with 4 vCPUs. Treat these as vendor figures and test with your own data.
  • Self-hosted versus cloud: the open-source server is free to run; Typesense Cloud and paid support with SLAs are commercial offerings from Typesense Inc.
  • Version tags: the README quick start pins the 29.0 Docker tag while the repository's default branch is v31, so check the image tags for the current release before deploying.
  • Platform packages: binary packages are listed for Linux x86_64 and arm64 and for macOS x86_64; Docker covers other setups.

Project activity

As of October 2026 the repository has about 26,900 stars. It was created in January 2017, is written in C++ and is licensed under GPL-3.0, with commits landing in October 2026. The README says Typesense Cloud serves more than 10 billion searches per month and that the Docker images have been downloaded over 12 million times. The source is at github.com/typesense/typesense, the documentation and API reference are at typesense.org/docs, and the public roadmap is linked from the README.

Enjoying this project?

Discover more amazing open-source projects on TechLogHub. We curate the best developer tools and projects.

Project
typesense
Created
October 18
Last Updated
October 18, 2026 at 03:20 PM

Maintain Typesense: Open-Source Typo-Tolerant Search Engine? Add the badge to your README

Show that the project is featured on TechLogHub and send readers to this write-up.

Featured on TechLogHub
[![Featured on TechLogHub](https://techloghub.com/badge-neutral.svg)](https://techloghub.com/open-source/typesense?utm_source=techloghub_badge&utm_medium=referral&utm_campaign=readme)

Find more projects like this

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.