From 466d718a05c8c3b69738816594f0ed5a45e63bbe Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Thu, 28 Mar 2024 11:51:41 +0100 Subject: [PATCH] Fix test --- milli/src/update/index_documents/mod.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index dbacb4002..d534661da 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -2672,7 +2672,16 @@ mod tests { .unwrap(); let rtxn = index.read_txn().unwrap(); - let res = index.search(&rtxn).vector([0.0, 1.0, 2.0].to_vec()).execute().unwrap(); + let mut embedding_configs = index.embedding_configs(&rtxn).unwrap(); + let (embedder_name, embedder) = embedding_configs.pop().unwrap(); + let embedder = + std::sync::Arc::new(crate::vector::Embedder::new(embedder.embedder_options).unwrap()); + assert_eq!("manual", embedder_name); + let res = index + .search(&rtxn) + .semantic(embedder_name, embedder, Some([0.0, 1.0, 2.0].to_vec())) + .execute() + .unwrap(); assert_eq!(res.documents_ids.len(), 3); }