Orama is a free, open source databases project written in TypeScript and released under a custom open-source licence. It has 10,555 GitHub stars, 402 forks and 23 open issues, and was last pushed 7 days ago. On this registry it ranks #48 of 81 tracked projects in Databases, with 5 head-to-head comparisons available. It gained 8 stars over the last 6 tracked days.

What is Orama?

What it is

Orama is a search engine and RAG pipeline written in TypeScript and distributed as an npm package. It can run in a browser, on a server, or on an edge network, and it provides full-text, vector, and hybrid search in a package described as less than 2kb. The project lives in the JavaScript and Node ecosystem, and it is categorized as infrastructure and operations database software.

The concrete problem it solves is the need to add search to an application without relying on a separate external search service. Instead of sending queries to a remote index, a developer can create a local database instance, define a schema, insert documents, and run searches in the same runtime. This makes it suitable for browser applications, server-side JavaScript services, and edge runtimes that need indexing and retrieval close to the user or the data.

Key capabilities

  • Full-text search supports typo tolerance, exact match, fields boosting, facets, filters, and BM25 relevance scoring.
  • Vector search and hybrid search are available through a vector schema field and a vector search mode.
  • Geosearch and geopoint data types allow location-aware queries.
  • GenAI chat sessions and an answer engine are listed as features for retrieval-augmented generation workflows.
  • Stemming and tokenization are available for 30 languages.
  • A plugin system allows search behavior to be extended beyond built-in features.
  • Pinning rules, also described as merchandising, allow selected results to be controlled in the result set.

Who uses it and how

  • Browser developers can import the package from a CDN and search data inside a client application.
  • Node developers can install the package with npm, yarn, pnpm, or bun and use it as an embedded search database inside a server application.
  • Edge developers can use the library in edge network runtimes when they need search close to the request.
  • Teams building RAG pipelines can insert documents with embeddings and query them with vector or hybrid search.
  • Applications that need faceted product search can use filters, facets, fields boosting, and pinning rules to shape results.

Getting started

The typical installation method is to add the @orama/orama package with npm, yarn, pnpm, or bun. It can also be imported directly in a browser module from a CDN, or in Deno from the same CDN URL or an npm specifier.

When to use it — and when not to

Orama is useful when search should be embedded in a JavaScript application, browser, or edge runtime, rather than operated as a separate search service. Because the facts describe a library and package installation, users must integrate it into their own application stack. The license is listed as NOASSERTION, so teams should review the licensing terms before using the project in production.

project readme (upstream, from github) — read inline

npm version Tests Changelog

If you need more info, help, or want to provide general feedback on Orama, join the Orama Slack channel

Highlighted features

Installation

You can install Orama using npm, yarn, pnpm, bun:

npm i @orama/orama

Or import it directly in a browser module:

<html>
  <body>
    <script type="module">
      import { create, insert, search } from 'https://cdn.jsdelivr.net/npm/@orama/orama@latest/+esm'
    </script>
  </body>
</html>

With Deno, you can just use the same CDN URL or use npm specifiers:

import { create, search, insert } from 'npm:@orama/orama'

Read the complete documentation at https://docs.orama.com.

Orama Features

Usage

Orama is quite simple to use. The first thing to do is to create a new database instance and set an indexing schema:

import { create, insert, remove, search, searchVector } from '@orama/orama'

const db = create({
  schema: {
    name: 'string',
    description: 'string',
    price: 'number',
    embedding: 'vector[1536]', // Vector size must be expressed during schema initialization
    meta: {
      rating: 'number',
    },
  },
})

insert(db, {
  name: 'Noise cancelling headphones',
  description: 'Best noise cancelling headphones on the market',
  price: 99.99,
  embedding: [0.2432, 0.9431, 0.5322, 0.4234, ...],
  meta: {
    rating: 4.5
  }
})

const results = search(db, {
  term: 'Best headphones'
})

// {
//   elapsed: {
//     raw: 21492,
//     formatted: '21μs',
//   },
//   hits: [
//     {
//       id: '41013877-56',
//       score: 0.925085832971998432,
//       document: {
//         name: 'Noise cancelling headphones',
//         description: 'Best noise cancelling headphones on the market',
//         price: 99.99,
//         embedding: [0.2432, 0.9431, 0.5322, 0.4234, ...],
//         meta: {
//           rating: 4.5
//         }
//       }
//     }
//   ],
//   count: 1
// }

Orama currently supports 10 different data types:

Type Description Example
string A string of characters. 'Hello world'
number A numeric value, either float or integer. 42
boolean A boolean value. true
enum An enum value. 'drama'
geopoint A geopoint value. { lat: 40.7128, lon: 74.0060 }
string[] An array of strings. ['red', 'green', 'blue']
number[] An array of numbers. [42, 91, 28.5]
boolean[] An array of booleans. [true, false, false]
enum[] An array of enums. ['comedy', 'action', 'romance']
vector[] A vector of numbers to perform vector search on. [0.403, 0.192, 0.830]

Vector and Hybrid Search Support

Orama supports both vector and hybrid search by just setting mode: 'vector' when performing search.

To perform this kind of search, you'll need to provide text embeddings at search time:

import { create, insertMultiple, search } from '@orama/orama'

const db = create({
  schema: {
    title: 'string',
    embedding: 'vector[5]', // we are using a 5-dimensional vector.
  },
});

insertMultiple(db, [
  { title: 'The Prestige', embedding: [0.938293, 0.284951, 0.348264, 0.948276, 0.56472] },
  { title: 'Barbie', embedding: [0.192839, 0.028471, 0.284738, 0.937463, 0.092827] },
  { title: 'Oppenheimer', embedding: [0.827391, 0.927381, 0.001982, 0.983821, 0.294841] },
])

const results = search(db, {
  // Search mode. Can be 'vector', 'hybrid', or 'fulltext'
  mode: 'vector',
  vector: {
    // The vector (text embedding) to use for search
    value: [0.938292, 0.284961, 0.248264, 0.748276, 0.26472],
    // The schema property where Orama should compare embeddings
    property: 'embedding',
  },
  // Minimum similarity to determine a match. Defaults to `0.8`
  similarity: 0.85,
  // Defaults to `false`. Setting to 'true' will return the embeddings in the response (which can be very large).
  includeVectors: true,
})

Have trouble generating embeddings for vector and hybrid search? Try our @orama/plugin-embeddings plugin!

import { create } from '@orama/orama'
import { pluginEmbeddings } from '@orama/plugin-embeddings'
import '@tensorflow/tfjs-node' // Or any other appropriate TensorflowJS backend, like @tensorflow/tfjs-backend-webgl

const plugin = await pluginEmbeddings({
  embeddings: {
    // Schema property used to store generated embeddings
    defaultProperty: 'embeddings',
    onInsert: {
      // Generate embeddings at insert-time
      generate: true,
      // properties to use for generating embeddings at insert time.
      // Will be concatenated to generate a unique embedding.
      properties: ['description'],
      verbose: true,
    }
  }
})

const db = create({
  schema: {
    description: 'string',
    // Orama generates 512-dimensions vectors.
    // When using @orama/plugin-embeddings, set the property where you want to store embeddings as `vector[512]`.
    embeddings: 'vector[512]'
  },
  plugins: [plugin]
})

// Orama will generate and store embeddings at insert-time!
await insert(db, { description: 'Classroom Headphones Bulk 5 Pack, Student On Ear Color Varieties' })
await insert(db, { description: 'Kids Wired Headphones for School Students K-12' })
await insert(db, { description: 'Kids Headphones Bulk 5-Pack for K-12 School' })
await insert(db, { description: 'Bose QuietComfort Bluetooth Headphones' })

// Orama will also generate 

readme truncated — read the full docs on github

Frequently asked questions

Is Orama free to use?

Orama is open source. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does Orama do?

Full-text & vector search at the edge.

What is Orama written in?

Orama is primarily written in TypeScript. Its source is publicly available at https://github.com/oramasearch/orama, and it has 10,555 GitHub stars.