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

Indexing

This section explains how Laurus stores and organizes data internally. Understanding the indexing layer will help you choose the right field types and tune performance.

Topics

Lexical Indexing

How text, numeric, and geographic fields are indexed using an inverted index. Covers:

  • The inverted index structure (term dictionary, posting lists)
  • BKD trees for numeric range queries
  • Segment files and their formats
  • BM25 scoring

Vector Indexing

How vector fields are indexed for approximate nearest neighbor search. Covers:

  • Index types: Flat, HNSW, IVF
  • Parameter tuning (m, ef_construction, n_clusters, n_probe)
  • Distance metrics (Cosine, Euclidean, DotProduct)
  • Quantization (SQ8, PQ)