Introduction
A complete search engine and RAG pipeline in your browser, server or edge network with support for full-text, vector, and hybrid search in less than 2kb.
ZBSearch (zee bee search) is a zero-bs fork of Orama maintained by the original Orama team. After Michele's departure, the entire engineering team left Orama and reassembled to maintain this popular project with no external influence. No VC, no business incentives, no bs. Just open source software.
ZBSearch is an open source, high performance full-text and vector search engine entirely written in TypeScript, with zero dependencies.
Performance vs Orama
ZBSearch is a drop-in fork of Orama with the same API and persistence format, but with heavily optimized internals. We benchmark both engines head-to-head in the benchmarks/ suite (Orama 3.1.18 vs ZBSearch 3.2.1, July 2026). The headline: ZBSearch is faster on almost every query path, with no trade-off in indexing speed or on-disk size. Full results are on the ZBSearch vs Orama page.
| Area | ZBSearch vs Orama | Highlight |
|---|---|---|
| Full-text search | 14–61% faster | Up to 15,219 ops/s on long-text + complex filters vs 5,976 |
| Facets | 30–59% faster | Faster across every facet scenario tested |
| Vector search (flat) | 12–56% faster | 7,558 ops/s strict similarity vs 4,864 |
| Vector search (IVF) | ~225–508% faster | 19,301 ops/s with filters - Orama has no IVF equivalent |
| Geosearch | ~8,700% faster | 384,158 ops/s on 500m radius vs 4,359 |
| Sorted indexes (AVL) | 10–107% faster | 107% faster on narrow range search; ~equal on comparisons |
| Persistence | Identical | Same JSON and GZIP size for the same dataset |
Requirements
A JavaScript runtime is the only requirement. ZBSearch has been designed to work on any JS runtime and has no dependencies.
Installation
You can install ZBSearch using any JavaScript package manager of your choice.
npm i zbsearchOr import it directly in a browser module:
<html>
<body>
<script type="module">
import {
create,
search,
insert,
} from "https://cdn.jsdelivr.net/npm/zbsearch@latest/+esm";
// ...
</script>
</body>
</html>Basic usage
import { create, search, insert } from "zbsearch";
// Create a new ZBSearch instance
const db = create({
schema: {
name: "string",
description: "string",
price: "number",
meta: {
rating: "number",
},
},
});
// Insert documents into the database
insert(db, {
name: "Wireless Headphones",
description: "Experience immersive sound quality with these noise-cancelling wireless headphones.",
price: 99.99,
meta: {
rating: 4.5,
},
});
// Search for documents
const searchResult = search(db, {
term: "headphones",
});
console.log(searchResult.hits.map((hit) => hit.document));For more information, check out the Usage section.
CommonJS Imports
ZBSearch ships ESM modules by default. This allows us to move faster when providing new features and bug fixes, as well as using the "exports" field in package.json to provide a better developer experience.
CommonJS imports are still supported, but we suggest you to migrate to ESM.
TypeScript
Set moduleResolution in the compilerOptions in your tsconfig.json to be either Node16 or NodeNext.
When importing types, always refer to the standard zbsearch import:
import type { Language } from "zbsearch";