Overview
Orama is a search engine written in JavaScript. You define a schema, insert documents, and query them with full-text, vector, or hybrid search. The same code runs in the browser, on the edge, or on a server, so you can keep search close to where your data already lives.
It fits the vector-database category by storing embeddings directly in the index. You declare a vector field with a fixed size in the schema, insert documents with their embeddings, then search by passing a query vector and a similarity threshold. Full-text search uses BM25, and hybrid search combines both signals in one query.
It suits front-end and full-stack developers who want in-app or in-page search without standing up a separate search service. Extra features like filters, facets, geosearch, typo tolerance, and stemming in 30 languages cover common search needs out of the box.
What it does
- Full-text search backed by BM25 ranking, with typo tolerance and exact match
- Vector and hybrid search by setting mode to 'vector' or 'hybrid' at query time
- Schema-typed documents with 10 field types, including vector[<size>], geopoint, and enum
- Runs in the browser, on the edge, on a server, or in Deno from the same package
- Filters, facets, field boosting, geosearch, and result pinning for merchandising
- Stemming and tokenization in 30 languages, plus a plugin system
Getting started
Install the package, create a database with a schema, insert documents, then search.
Install Orama
Install with your package manager of choice (npm, yarn, pnpm, or bun). You can also import it directly in a browser module or in Deno via CDN.
npm i @orama/oramaCreate a database and set a schema
Create an instance and declare the fields you want to index. Vector size must be set in the schema.
import { create, insert, search } from '@orama/orama'
const db = create({
schema: {
name: 'string',
description: 'string',
price: 'number',
},
})Insert and search documents
Add a document, then run a full-text query with a search term.
insert(db, {
name: 'Noise cancelling headphones',
description: 'Best noise cancelling headphones on the market',
price: 99.99,
})
const results = search(db, {
term: 'Best headphones',
})Run a vector search
Add a vector field to the schema, then search by passing a query vector, the property to compare against, and a minimum similarity.
const results = search(db, {
mode: 'vector',
vector: {
value: [0.938292, 0.284961, 0.248264, 0.748276, 0.26472],
property: 'embedding',
},
similarity: 0.85,
})Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Add in-page search to a docs site or web app that runs entirely in the browser
- Build semantic or hybrid search over a product catalog using stored embeddings
- Run search on the edge or in serverless functions without a separate search service
- Power faceted, filtered product search with field boosting and result pinning
How Orama compares
Orama alongside other open-source vector databases tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Supabase | ★ 105k | Managed Postgres backend whose Vector toolkit (pgvector) stores, indexes, and queries embeddings next to transactional data. |
| Redis Cloud | ★ 75k | Fully-managed Redis with built-in vector search, offering low-latency similarity and hybrid queries over any embeddings. |
| Milvus | ★ 44.9k | A distributed vector database for storing and searching billions of embeddings at scale, with multiple index types and Kubernetes-native deployment. |
| FAISS | ★ 40.4k | A library from Meta for efficient similarity search and clustering of dense vectors, with both exact and approximate indexes. |
| Qdrant | ★ 32.5k | A Rust-based vector search engine that stores embeddings with rich payload filtering for semantic search and recommendation systems. |
| Chroma | ★ 28.5k | A developer-focused vector database designed for quickly building retrieval and RAG features with a simple Python and JavaScript API. |
| pgvector | ★ 21.8k | A PostgreSQL extension that adds a vector data type and similarity search so you can store and query embeddings inside an existing Postgres database. |
| Orama | ★ 10.4k | JavaScript search engine with full-text, vector, and hybrid search that runs anywhere |