gitmyhub

orama

TypeScript ★ 10k updated 4mo ago

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

A tiny in-app search engine that runs entirely inside your app, no server, no network round trip, with full-text, vector, and hybrid search in under 2 KB.

TypeScriptJavaScriptsetup: easycomplexity 2/5

Orama is a search engine library that runs entirely inside your application, with no external server required. You can use it in a web browser, on a Node.js server, or on edge networks that run code close to users around the world. The whole library weighs under 2 kilobytes, which means it adds almost nothing to your page load time.

The way it works is straightforward. You define a schema that describes the shape of your data, insert your records into an in-memory database, and then run searches against it. Orama returns matching results along with relevance scores and timing information. Because everything lives in memory within your application, search results come back very quickly without any network round trips to a separate search service.

Orama supports three kinds of search. Full-text search finds documents that contain the words you typed, with built-in tolerance for typos and support for stemming in 30 languages (so a search for "running" can also match "run"). Vector search compares numeric representations of meaning rather than exact words, which lets you find documents that are conceptually similar even if they share no common words. Hybrid search combines both approaches at once.

Beyond basic search, the library includes filtering to narrow results by field values, facets for building category counts, fields boosting to make certain fields count more in scoring, geographic search for location-based queries, and a plugin system for extending its capabilities. There is also support for GenAI chat sessions, described in the documentation as an answer engine feature.

Installation is a single npm command, and the library can also be imported directly from a CDN in plain HTML without any build tools. The documentation lives at docs.orama.com.

Where it fits