Create a new segment file with explicit surrogate IDs and open it.
(
path: &Path,
dim: usize,
vectors: &[&[f32]],
surrogate_ids: &[u64],
)
| 52 | |
| 53 | /// Create a new segment file with explicit surrogate IDs and open it. |
| 54 | pub fn create_with_surrogates( |
| 55 | path: &Path, |
| 56 | dim: usize, |
| 57 | vectors: &[&[f32]], |
| 58 | surrogate_ids: &[u64], |
| 59 | ) -> std::io::Result<Self> { |
| 60 | write_segment(path, dim, vectors, surrogate_ids)?; |
| 61 | Self::open_with_policy(path, VectorSegmentDropPolicy::default()) |
| 62 | } |
| 63 | |
| 64 | /// Create a new segment with an explicit drop policy. |
| 65 | pub fn create_with_policy( |
nothing calls this directly
no test coverage detected