From d7de819d11491dd5a2aa16bac0e24e96f8b02a91 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Thu, 18 Sep 2025 14:26:13 +0200 Subject: [PATCH] Bump Hannoy to fix unreachable documents --- 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..ec5e9a531 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2613,14 +2613,15 @@ dependencies = [ [[package]] name = "hannoy" -version = "0.0.5" +version = "0.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6a412d145918473a8257706599a1088c505047eef9cc6c63c494c95786044f" +checksum = "0dba13a271c49a119a97862ebf0a74131d879832868400d9fcd937b790058fdd" 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..663ec7e6f 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.8", 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 d4d3f26cb..8585fc79f 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) {