mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 18:17:39 +08:00
Build the embedders when importing a dump
This commit is contained in:
parent
b005eb3289
commit
716ffc07ee
@ -426,6 +426,9 @@ fn import_dump(
|
|||||||
let reader = BufReader::new(file);
|
let reader = BufReader::new(file);
|
||||||
let reader = DocumentsBatchReader::from_reader(reader)?;
|
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(
|
let builder = milli::update::IndexDocuments::new(
|
||||||
&mut wtxn,
|
&mut wtxn,
|
||||||
&index,
|
&index,
|
||||||
@ -438,6 +441,8 @@ fn import_dump(
|
|||||||
|| false,
|
|| false,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
let builder = builder.with_embedders(embedders);
|
||||||
|
|
||||||
let (builder, user_result) = builder.add_documents(reader)?;
|
let (builder, user_result) = builder.add_documents(reader)?;
|
||||||
let user_result = user_result?;
|
let user_result = user_result?;
|
||||||
tracing::info!(documents_found = user_result, "{} documents found.", user_result);
|
tracing::info!(documents_found = user_result, "{} documents found.", user_result);
|
||||||
|
Loading…
Reference in New Issue
Block a user