Skip to content

Orama JavaScript library

OramaJS is a JavaScript package that indexes records in your application for keyword, vector or combined search.

Visit Orama JavaScript library

What do you put into an OramaJS search index?

Install the package in your JavaScript app. Describe the fields each record has, such as a title, a category and a description. Then add the records you want to search. The package can run in the browser, on a server or at the edge.

A keyword search can be enough for a small help center. Vector search uses numerical descriptions of meaning called embeddings. If you add it, decide where those numbers come from and use compatible vectors for the records and the query.

How can you plan a first search before building it?

Use paper and three fictional help records. Write each ID, title, topic and public or private label. Leave any real application or index untouched.

  1. Choose what the visitor can find
    Draw a public Reset password guide, a public Download an invoice guide and a private support note about passwords. A public search for password should return the reset guide only.
  2. Remove one record and check what stays
    Cross out the reset guide. The public password result should disappear after the index is refreshed. A search for invoice should still find the download guide.

What should you keep if you rebuild the index?

OramaJS is Apache-2.0 licensed. It has no per-query fee when you run the package yourself. You supply the runtime, storage and any service you use to create embeddings. Test index size, memory use and search time with your own records.

Keep source records, stable IDs, field definitions and indexing settings. Orama offers a data persistence plugin if you want to save an index for later use. Update or rebuild the index when source records change, and verify that deleted records disappear from the next version.