Fix the indexation tests

This commit is contained in:
Kerollmops
2022-06-15 14:35:19 +02:00
parent fcfc4caf8c
commit 399eec5c01
15 changed files with 288 additions and 194 deletions

View File

@ -390,8 +390,7 @@ fn criteria_ascdesc() {
// index documents
let config = IndexerConfig { max_memory: Some(10 * 1024 * 1024), ..Default::default() };
let indexing_config = IndexDocumentsConfig { autogenerate_docids: true, ..Default::default() };
let mut builder =
IndexDocuments::new(&mut wtxn, &index, &config, indexing_config, |_| ()).unwrap();
let builder = IndexDocuments::new(&mut wtxn, &index, &config, indexing_config, |_| ()).unwrap();
let mut batch_builder = DocumentsBatchBuilder::new(Vec::new());
@ -422,7 +421,8 @@ fn criteria_ascdesc() {
let vector = batch_builder.into_inner().unwrap();
let reader = DocumentsBatchReader::from_reader(Cursor::new(vector)).unwrap();
builder.add_documents(reader).unwrap();
let (builder, user_error) = builder.add_documents(reader).unwrap();
user_error.unwrap();
builder.execute().unwrap();
wtxn.commit().unwrap();