What are Orama Plugins?
Orama’s plugin system allows you to extend and customize the behavior of your search instances with additional functionality. Plugins hook into Orama’s lifecycle events to modify data at insert time, enhance search queries, collect analytics, and more.Available Plugins
Embeddings
Generate text embeddings offline for vector and hybrid search
Secure Proxy
Cloud-based embeddings and LLM features with secure API proxy
Analytics
Track and analyze search queries, results, and user behavior
Data Persistence
Serialize and restore Orama instances in multiple formats
Match Highlight
Highlight search matches in results (deprecated)
ParseDoc
Parse and index HTML/Markdown documentation files
How Plugins Work
Plugins implement hooks that are called at specific points in Orama’s lifecycle:Available Plugin Hooks
Orama provides the following lifecycle hooks for plugins:Insert Hooks
Insert Hooks
beforeInsert- Called before inserting a documentafterInsert- Called after inserting a documentbeforeInsertMultiple- Called before inserting multiple documentsafterInsertMultiple- Called after inserting multiple documents
Update Hooks
Update Hooks
beforeUpdate- Called before updating a documentafterUpdate- Called after updating a documentbeforeUpdateMultiple- Called before updating multiple documentsafterUpdateMultiple- Called after updating multiple documents
Remove Hooks
Remove Hooks
beforeRemove- Called before removing a documentafterRemove- Called after removing a documentbeforeRemoveMultiple- Called before removing multiple documentsafterRemoveMultiple- Called after removing multiple documents
Upsert Hooks
Upsert Hooks
beforeUpsert- Called before upserting a documentafterUpsert- Called after upserting a documentbeforeUpsertMultiple- Called before upserting multiple documentsafterUpsertMultiple- Called after upserting multiple documents
Search Hooks
Search Hooks
beforeSearch- Called before performing a searchafterSearch- Called after performing a search
Instance Hooks
Instance Hooks
afterCreate- Called after creating an Orama instancebeforeLoad- Called before loading data into an instanceafterLoad- Called after loading data into an instance
Plugin Types
Orama supports both synchronous and asynchronous plugins:Synchronous Plugins
Asynchronous Plugins
Using Multiple Plugins
You can use multiple plugins together. They will be executed in the order they are defined:Next Steps
Write Custom Plugins
Learn how to create your own Orama plugins
Explore Official Plugins
Browse available official plugins