From a47888f02cec8780cd2a08f098f79e72f6f46535 Mon Sep 17 00:00:00 2001 From: nnethercott Date: Tue, 16 Sep 2025 11:02:46 +0200 Subject: [PATCH] bump hannoy to 0.6 --- Cargo.lock | 14 ++++++++++++-- crates/milli/Cargo.toml | 2 +- crates/milli/src/vector/store.rs | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 64d80186b..985cfaa97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2613,14 +2613,15 @@ dependencies = [ [[package]] name = "hannoy" -version = "0.0.5" +version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6a412d145918473a8257706599a1088c505047eef9cc6c63c494c95786044f" +checksum = "6079f3d1f94be72564b6c61bd565bdfc6458ce0f0e0f66c4fe4799ccc2b932d0" dependencies = [ "bytemuck", "byteorder", "hashbrown 0.15.5", "heed", + "madvise", "min-max-heap", "page_size", "papaya", @@ -3749,6 +3750,15 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "670fdfda89751bc4a84ac13eaa63e205cf0fd22b4c9a5fbfa085b63c1f1d3a30" +[[package]] +name = "madvise" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e1e75c3c34c2b34cec9f127418cb35240c7ebee5de36a51437e6b382c161b86" +dependencies = [ + "libc", +] + [[package]] name = "manifest-dir-macros" version = "0.1.18" diff --git a/crates/milli/Cargo.toml b/crates/milli/Cargo.toml index a76deea67..7832ace33 100644 --- a/crates/milli/Cargo.toml +++ b/crates/milli/Cargo.toml @@ -88,7 +88,7 @@ rhai = { version = "1.22.2", features = [ "sync", ] } arroy = "0.6.3" -hannoy = "0.0.5" +hannoy = { version = "0.0.6", features = ["arroy"] } rand = "0.8.5" tracing = "0.1.41" ureq = { version = "2.12.1", features = ["json"] } diff --git a/crates/milli/src/vector/store.rs b/crates/milli/src/vector/store.rs index 667d6b37d..76bd6ecfe 100644 --- a/crates/milli/src/vector/store.rs +++ b/crates/milli/src/vector/store.rs @@ -705,7 +705,7 @@ impl VectorStore { &'a self, rtxn: &'a RoTxn<'a>, db: hannoy::Database, - ) -> impl Iterator, hannoy::Error>> + 'a { + ) -> impl Iterator, hannoy::Error>> + 'a { vector_store_range_for_embedder(self.embedder_index).filter_map(move |index| { match hannoy::Reader::open(rtxn, index, db) { Ok(reader) => match reader.is_empty(rtxn) {