Prerequisites
Before you begin, make sure you have installed Orama in your project.Create your first search engine
Define your schema
Create a new database instance with a schema that defines the structure of your documents:The schema tells Orama what fields your documents will have and what data types to expect. This enables type-safe operations and optimizes search performance.
Insert documents
Add documents to your database using the
insert method:You can also use
insertMultiple to insert multiple documents at once for better performance.Complete example
Here’s the complete code from this quickstart:Understanding search results
Orama returns search results with the following structure:- elapsed - Time taken to perform the search (in microseconds)
- hits - Array of matching documents with their scores
- count - Total number of results found
- id - Unique document identifier
- score - Relevance score (higher is more relevant)
- document - The full document matching your query
Advanced search options
Orama supports many advanced search features. Here are a few examples:Search with filters
Limit and offset for pagination
Boost specific fields
Next steps
Full-text search
Learn about advanced full-text search features
Vector search
Implement semantic search with embeddings
Filters and facets
Filter and facet your search results
Plugins
Extend Orama with official and custom plugins