Fix the indexation tests

This commit is contained in:
Kerollmops 2022-06-15 14:35:19 +02:00
parent fcfc4caf8c
commit 399eec5c01
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
15 changed files with 288 additions and 194 deletions

View file

@ -255,7 +255,7 @@ impl Performer for DocumentAddition {
let bar = progesses.add(bar);
bars.push(bar);
}
let mut addition = milli::update::IndexDocuments::new(
let addition = milli::update::IndexDocuments::new(
&mut txn,
&index,
&config,
@ -263,7 +263,10 @@ impl Performer for DocumentAddition {
|step| indexing_callback(step, &bars),
)
.unwrap();
addition.add_documents(reader)?;
let (addition, user_error) = addition.add_documents(reader)?;
if let Err(error) = user_error {
return Err(error.into());
}
std::thread::spawn(move || {
progesses.join().unwrap();