From 3c31e1cdd1cce1b8e3ab5740609dbee0a1f0b166 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Wed, 14 Jun 2023 15:45:00 +0200 Subject: [PATCH] Support more pages but in an ugly way --- milli/src/search/new/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/milli/src/search/new/mod.rs b/milli/src/search/new/mod.rs index 948a2fa21..d56e9d1ed 100644 --- a/milli/src/search/new/mod.rs +++ b/milli/src/search/new/mod.rs @@ -457,19 +457,18 @@ pub fn execute_search( let neighbors = hnsw.nearest(&vector, ef, &mut searcher, &mut dest[..]); let mut docids = Vec::new(); - for Neighbor { index, distance } in neighbors.iter() { + for Neighbor { index, distance: _ } in neighbors.iter() { let index = BEU32::new(*index as u32); let docid = ctx.index.vector_id_docid.get(ctx.txn, &index)?.unwrap().get(); - dbg!(distance, f32::from_bits(*distance)); if universe.contains(docid) { docids.push(docid); - if docids.len() == length { + if docids.len() == (from + length) { break; } } } - docids + docids.into_iter().skip(from).take(length).collect() } // return the search docids if the vector field is not specified None => docids,