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

Method insert

nodedb-vector/src/collection/lifecycle_insert_ops.rs:11–16  ·  view source on GitHub ↗

Insert a vector. Returns the global vector ID.

(&mut self, vector: Vec<f32>)

Source from the content-addressed store, hash-verified

9impl VectorCollection {
10 /// Insert a vector. Returns the global vector ID.
11 pub fn insert(&mut self, vector: Vec<f32>) -> u32 {
12 let id = self.next_id;
13 self.growing.insert(vector);
14 self.next_id += 1;
15 id
16 }
17
18 /// Insert a vector with an associated surrogate. The surrogate is
19 /// allocated by the Control Plane before the call; the engine only

Callers 2

insert_with_surrogateMethod · 0.45
insert_multi_vectorMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected