diff --git a/Cargo.lock b/Cargo.lock index c3f2befef..198c9262d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -384,8 +384,9 @@ dependencies = [ [[package]] name = "arroy" -version = "0.1.0" -source = "git+https://github.com/meilisearch/arroy.git#d372648212e561a4845077cdb9239423d78655a2" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efddeb1e7c32a551cc07ef4c3e181e3cd5478fdaf4f0bd799983171c1f6efe57" dependencies = [ "bytemuck", "byteorder", diff --git a/milli/Cargo.toml b/milli/Cargo.toml index f3b92dbd0..ec27b5f39 100644 --- a/milli/Cargo.toml +++ b/milli/Cargo.toml @@ -89,7 +89,7 @@ reqwest = { version = "0.11.23", features = [ ], default-features = false } tiktoken-rs = "0.5.8" liquid = "0.26.4" -arroy = { git = "https://github.com/meilisearch/arroy.git", version = "0.1.0" } +arroy = "0.2.0" rand = "0.8.5" [dev-dependencies] diff --git a/milli/src/error.rs b/milli/src/error.rs index d0a4d35ef..5a4fbc7f5 100644 --- a/milli/src/error.rs +++ b/milli/src/error.rs @@ -251,6 +251,7 @@ impl From for Error { arroy::Error::DatabaseFull | arroy::Error::InvalidItemAppend | arroy::Error::UnmatchingDistance { .. } + | arroy::Error::MissingNode | arroy::Error::MissingMetadata => { Error::InternalError(InternalError::ArroyError(value)) } diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index e797c0380..83d2c08e1 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -522,12 +522,8 @@ where pool.install(|| { let writer_index = (embedder_index as u16) << 8; for k in 0..=u8::MAX { - let writer = arroy::Writer::prepare( - wtxn, - vector_arroy, - writer_index | (k as u16), - dimension, - )?; + let writer = + arroy::Writer::new(vector_arroy, writer_index | (k as u16), dimension)?; if writer.is_empty(wtxn)? { break; } diff --git a/milli/src/update/index_documents/typed_chunk.rs b/milli/src/update/index_documents/typed_chunk.rs index e12479bee..58cb9bb02 100644 --- a/milli/src/update/index_documents/typed_chunk.rs +++ b/milli/src/update/index_documents/typed_chunk.rs @@ -372,8 +372,7 @@ pub(crate) fn write_typed_chunk_into_index( // FIXME: allow customizing distance let writers: std::result::Result, _> = (0..=u8::MAX) .map(|k| { - arroy::Writer::prepare( - wtxn, + arroy::Writer::new( index.vector_arroy, writer_index | (k as u16), expected_dimension,