AI/TLDR

Orama

JavaScript search engine with full-text, vector, and hybrid search that runs anywhere

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.

bashbash
npm i @orama/orama

Create 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.

jsjs
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.

jsjs
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.

jsjs
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.

ToolStarsWhat it does
Supabase★ 105kManaged Postgres backend whose Vector toolkit (pgvector) stores, indexes, and queries embeddings next to transactional data.
Redis Cloud★ 75kFully-managed Redis with built-in vector search, offering low-latency similarity and hybrid queries over any embeddings.
Milvus★ 44.9kA distributed vector database for storing and searching billions of embeddings at scale, with multiple index types and Kubernetes-native deployment.
FAISS★ 40.4kA library from Meta for efficient similarity search and clustering of dense vectors, with both exact and approximate indexes.
Qdrant★ 32.5kA Rust-based vector search engine that stores embeddings with rich payload filtering for semantic search and recommendation systems.
Chroma★ 28.5kA developer-focused vector database designed for quickly building retrieval and RAG features with a simple Python and JavaScript API.
pgvector★ 21.8kA 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.4kJavaScript search engine with full-text, vector, and hybrid search that runs anywhere