pub struct KnowledgeIndex { /* private fields */ }Expand description
In-memory knowledge index for a session’s vault.
Built from a Lago manifest + blob store. Provides name/path resolution, scored search, and graph traversal over wikilink edges.
Implementations§
Source§impl KnowledgeIndex
impl KnowledgeIndex
Sourcepub fn build(
manifest: &[ManifestEntry],
store: &BlobStore,
) -> Result<Self, KnowledgeError>
pub fn build( manifest: &[ManifestEntry], store: &BlobStore, ) -> Result<Self, KnowledgeError>
Build an index from a Lago manifest and blob store.
Reads all .md entries, parses frontmatter, extracts wikilinks,
and builds the name/path maps and graph adjacency list.
Sourcepub fn resolve_wikilink(&self, target: &str) -> Option<&Note>
pub fn resolve_wikilink(&self, target: &str) -> Option<&Note>
Resolve a wikilink target to a Note.
Tries name lookup first, then path lookup. Strips heading anchors
(Note#heading → Note).
Source§impl KnowledgeIndex
impl KnowledgeIndex
Sourcepub fn traverse(
&self,
start: &str,
depth: usize,
max_notes: usize,
) -> Vec<TraversalResult>
pub fn traverse( &self, start: &str, depth: usize, max_notes: usize, ) -> Vec<TraversalResult>
BFS traversal from a starting note, up to depth hops and
max_notes total results.
The start note is resolved via wikilink resolution (name or path). Returns notes in BFS order with their depth from the start.
Auto Trait Implementations§
impl Freeze for KnowledgeIndex
impl RefUnwindSafe for KnowledgeIndex
impl Send for KnowledgeIndex
impl Sync for KnowledgeIndex
impl Unpin for KnowledgeIndex
impl UnsafeUnpin for KnowledgeIndex
impl UnwindSafe for KnowledgeIndex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more