From 716ffc07eec12b97c49f1be130b870756c6350f3 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Mon, 26 Feb 2024 22:15:57 +0100 Subject: [PATCH] Build the embedders when importing a dump --- meilisearch/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meilisearch/src/lib.rs b/meilisearch/src/lib.rs index 0d892e7e8..9d9274b9d 100644 --- a/meilisearch/src/lib.rs +++ b/meilisearch/src/lib.rs @@ -426,6 +426,9 @@ fn import_dump( let reader = BufReader::new(file); let reader = DocumentsBatchReader::from_reader(reader)?; + let embedder_configs = index.embedding_configs(&wtxn)?; + let embedders = index_scheduler.embedders(embedder_configs)?; + let builder = milli::update::IndexDocuments::new( &mut wtxn, &index, @@ -438,6 +441,8 @@ fn import_dump( || false, )?; + let builder = builder.with_embedders(embedders); + let (builder, user_result) = builder.add_documents(reader)?; let user_result = user_result?; tracing::info!(documents_found = user_result, "{} documents found.", user_result);