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
//! Engine-agnostic searchable-index trait.
//!
//! Both [`HybridIndex`](crate::hybrid::HybridIndex) (transformer
//! engines) and [`RipvecIndex`](crate::encoder::ripvec::index::RipvecIndex)
//! (the cacheless ripvec engine) expose the same operational surface
//! to downstream consumers: a slice of chunks, the embedding row for
//! a chunk by index, and a search method that returns `(chunk_idx,
//! score)` pairs ranked descending.
//!
//! Naming the surface as a trait lets LSP / MCP code (navigation,
//! symbols, hover, references, calls) take `&dyn SearchableIndex`
//! instead of `&HybridIndex` and work transparently across engines.
//! Without it, every engine swap requires touching every LSP module.
use crateCodeChunk;
use crateSearchMode;
/// Engine-agnostic searchable index.
///
/// Implementations: [`HybridIndex`](crate::hybrid::HybridIndex) for
/// transformer engines,
/// [`RipvecIndex`](crate::encoder::ripvec::index::RipvecIndex) for
/// the ripvec engine.