MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / get_vector_raw

Method get_vector_raw

nodedb-vector/src/flat.rs:292–300  ·  view source on GitHub ↗

Raw access bypassing tombstone filter — used by snapshot/restore.

(&self, id: u32)

Source from the content-addressed store, hash-verified

290
291 /// Raw access bypassing tombstone filter — used by snapshot/restore.
292 pub fn get_vector_raw(&self, id: u32) -> Option<&[f32]> {
293 let idx = id as usize;
294 if idx < self.deleted.len() {
295 let start = idx * self.dim;
296 Some(&self.data[start..start + self.dim])
297 } else {
298 None
299 }
300 }
301
302 /// Whether the given local id has been tombstoned.
303 pub fn is_deleted(&self, id: u32) -> bool {

Callers 1

checkpoint_to_bytesMethod · 0.80

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected