Introduction
Orama is an open-source, dependency-free search engine written in TypeScript that supports full-text, vector, and hybrid search. It runs anywhere JavaScript runs — browsers, Node.js, Deno, Bun, and edge runtimes — providing portable search without external services.
What Orama Does
- Provides sub-millisecond full-text search with built-in typo tolerance and stemming
- Supports vector search and hybrid (keyword + vector) ranking in a single engine
- Runs entirely in-process with no external dependencies or servers required
- Offers faceted search, filters, sorting, grouping, and geo-search
- Includes a plugin system for analytics, persistence, and custom tokenizers
Architecture Overview
Orama stores documents in an in-memory radix tree for text indexing and flat arrays for vector embeddings. Keyword queries traverse the prefix tree while vector lookups use cosine similarity. Results are scored and merged in a single pass with no network overhead. The index serializes to JSON for persistence.
Self-Hosting & Configuration
- Install via npm, yarn, or pnpm with no native dependencies
- Import as an ES module or CommonJS package
- Define a schema object describing document fields and types
- Configure custom tokenizers, stemming, or language settings as needed
- Persist indexes using the persistence plugin or manual JSON serialization
Key Features
- Zero external dependencies; runs on any JavaScript runtime
- Hybrid search combining BM25 full-text ranking with vector similarity
- Built-in typo tolerance with configurable edit distance
- Faceted search, filters, and geo-search out of the box
- Pluggable architecture for extending indexing and search behavior
Comparison with Similar Tools
- Lunr.js — simpler API but lacks vector search, facets, and active maintenance
- FlexSearch — fast full-text but no vector or hybrid capabilities
- MiniSearch — lightweight but limited to keyword search only
- Meilisearch — server-based with broader features but requires a separate process
- Typesense — hosted or self-hosted server; Orama runs in-process without infrastructure
FAQ
Q: Does Orama require a server? A: No. It runs entirely in-process wherever JavaScript runs, including browsers and edge functions.
Q: Can I use Orama with React or Vue? A: Yes. Orama provides framework-agnostic hooks and official integrations for popular frameworks.
Q: How large can the dataset be? A: Browser-side indexes handle tens of thousands of documents; server-side indexes scale to hundreds of thousands.
Q: Does Orama support multiple languages? A: Yes. Built-in stemmers and tokenizers cover 30+ languages.