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.
Who can see records in an OramaJS index?
The app chooses what goes into the index and where it runs. A public browser index should contain only public data. For private records, check the signed-in person’s permissions on the server and return only the matching records and fields they can see.
A category filter can narrow a person’s search. It cannot protect records that the app has already delivered to the browser.
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.
- Choose what the visitor can findDraw 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.
- Remove one record and check what staysCross 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.