Create a new segment with an explicit drop policy.
(
path: &Path,
dim: usize,
vectors: &[&[f32]],
policy: VectorSegmentDropPolicy,
)
| 63 | |
| 64 | /// Create a new segment with an explicit drop policy. |
| 65 | pub fn create_with_policy( |
| 66 | path: &Path, |
| 67 | dim: usize, |
| 68 | vectors: &[&[f32]], |
| 69 | policy: VectorSegmentDropPolicy, |
| 70 | ) -> std::io::Result<Self> { |
| 71 | write_segment(path, dim, vectors, &[])?; |
| 72 | Self::open_with_policy(path, policy) |
| 73 | } |
| 74 | |
| 75 | /// Open an existing segment file and memory-map it. |
| 76 | pub fn open(path: &Path) -> std::io::Result<Self> { |
nothing calls this directly
no test coverage detected