Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Getting Started

Welcome to Laurus! This section will help you install the library and run your first search.

What You Will Build

By the end of this guide, you will have a working search engine that can:

  • Index text documents
  • Perform keyword (lexical) search
  • Perform semantic (vector) search
  • Combine both with hybrid search

Prerequisites

  • Rust 1.85 or later (edition 2024)
  • Cargo (included with Rust)
  • Tokio runtime (Laurus uses async APIs)

Steps

  1. Installation — Add Laurus to your project and choose feature flags
  2. Quick Start — Build a complete search engine in 5 steps

Workflow Overview

Building a search application with Laurus follows a consistent pattern:

graph LR
    A["1. Create\nStorage"] --> B["2. Define\nSchema"]
    B --> C["3. Build\nEngine"]
    C --> D["4. Index\nDocuments"]
    D --> E["5. Search"]
StepWhat Happens
Create StorageChoose where data lives — in memory, on disk, or memory-mapped
Define SchemaDeclare fields and their types (text, integer, vector, etc.)
Build EngineAttach an analyzer (for text) and an embedder (for vectors)
Index DocumentsAdd documents; the engine routes fields to the correct index
SearchRun lexical, vector, or hybrid queries and get ranked results