Expand description
.omen single-file storage format for OmenDB
Layout:
┌─────────────────────────────────────────────────────────────┐
│ HEADER (4KB, page 0) │
├─────────────────────────────────────────────────────────────┤
│ VECTOR SECTION (page-aligned, mmap) │
├─────────────────────────────────────────────────────────────┤
│ GRAPH SECTION (page-aligned, mmap) │
├─────────────────────────────────────────────────────────────┤
│ METADATA SECTION │
├─────────────────────────────────────────────────────────────┤
│ WAL SECTION (append-only, at end) │
└─────────────────────────────────────────────────────────────┘Structs§
- Graph
Section - Graph section - stores HNSW neighbor lists
- Metadata
Index - Metadata index - collection of field indexes
- Omen
File OmenFile- single-file vector database- Omen
Header - .omen file header
- Section
Entry - Section entry in header (24 bytes)
- Vector
Section - Vector section - contiguous array of vectors
- Wal
- Write-Ahead Log
- WalEntry
- WAL entry (header + data)
Enums§
- Field
Index - Field index - wraps different index types
- Filter
- Filter expressions
- Filter
Value - Filter value types
- Metric
- Distance metric for similarity search (user-facing API type).
- Section
Type - Section types
- WalEntry
Type - WAL entry types
Constants§
- HEADER_
SIZE - Header size (4KB, one page)
- MAGIC
- Magic bytes: “OMEN”
- PAGE_
SIZE - Page size for alignment (8KB optimal for
NVMe) - VERSION_
MAJOR - Current format version
- VERSION_
MINOR
Functions§
- align_
to_ page - Align a value to page boundary