$ account typesense
Typesense is a high-performance, open-source search engine written in C++17, designed as a drop-in alternative to Algolia and Elasticsearch. It provides a RESTful HTTP API for full-text search, faceted navigation, geospatial filtering, vector search (with HNSW), and hybrid (semantic + keyword) search. The architecture is a distributed, Raft-based clustered system with leader election, log replication, and snapshotting, ensuring high availability and consistency. The server integrates with external AI providers (OpenAI, Google, Azure, Cloudflare) for embedding generation and natural language query processing, and supports on-device ONNX models for text, image, and voice search. The codebase is modular, with singleton managers for collections, embeddings, analytics, rate limiting, and authentication, all built on top of a RocksDB-backed key-value store. Extensive test coverage includes C++ unit tests (gtest), TypeScript integration tests (Bun), and benchmark infrastructure (k6, InfluxDB). While primarily an application, it incorporates data-intensive features like statistical sketches (TDigest, CountMinSketch), custom indexing data structures (ART, numeric trie, hat-trie), and analytics pipelines, giving it a hybrid character.