1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//! HNSW (Hierarchical Navigable Small World) index implementation.
//!
//! This module provides high-performance approximate nearest neighbor search
//! based on the HNSW algorithm.
//!
//! # Native Implementation (v1.0+)
//!
//! `VelesDB` uses a custom native HNSW implementation that is:
//! - **faster at search** than the `hnsw_rs` it replaced in 1.0.0
//! - **faster at parallel insert** (history in `docs/reference/NATIVE_HNSW.md`)
//! - **at recall parity** with it, with no accuracy loss
//!
//! # Module Organization
//!
//! - `params`: Index parameters and search quality profiles
//! - `native`: Core HNSW graph with SIMD distance calculations
//! - `index`: Main `HnswIndex` API
// ============================================================================
// Core modules
// ============================================================================
pub
pub
pub
pub
/// The placement token, for tests outside this module that drive the mappings
/// directly (`Placed::for_test`).
pub use Placed;
pub
pub
// ============================================================================
// Tests
// ============================================================================
// ============================================================================
// Public API
// ============================================================================
pub use ;
/// Main HNSW index for vector search operations.
pub use HnswIndex;
/// Native HNSW index with direct access to underlying graph.
pub use NativeHnswIndex;
/// Removes f32 arena files a previous run left behind in `dir`.
///
/// A graph deletes its own arena on drop; a crash or a kill skips that. The
/// leftovers are unreadable to anyone — the per-instance token that named
/// them is gone — so they are pure waste. Call once when opening a
/// collection, before any graph claims a new one — never later: it cannot
/// tell a live arena from an abandoned one, so a late call deletes the file
/// out from under a running graph.
///
/// Best-effort: a file that will not go away is a diagnostic, never a reason
/// to refuse to open a collection whose real data is intact.
pub