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

Method create

nodedb-vector/src/mmap_segment/reader.rs:48–51  ·  view source on GitHub ↗

Create a new segment file (surrogates default to 0) and open it.

(path: &Path, dim: usize, vectors: &[&[f32]])

Source from the content-addressed store, hash-verified

46
47 /// Create a new segment file (surrogates default to 0) and open it.
48 pub fn create(path: &Path, dim: usize, vectors: &[&[f32]]) -> std::io::Result<Self> {
49 write_segment(path, dim, vectors, &[])?;
50 Self::open_with_policy(path, VectorSegmentDropPolicy::default())
51 }
52
53 /// Create a new segment file with explicit surrogate IDs and open it.
54 pub fn create_with_surrogates(

Callers 7

openMethod · 0.45
openMethod · 0.45
open_with_start_lsnMethod · 0.45
openMethod · 0.45
write_segmentFunction · 0.45
handle_chunkFunction · 0.45
handle_chunkMethod · 0.45

Calls 1

write_segmentFunction · 0.70

Tested by

no test coverage detected