Fix functions calls to use the new mixed system

This commit is contained in:
Kerollmops
2025-01-28 12:13:13 +01:00
parent 8e6893ddbe
commit 294e1ba16d
3 changed files with 66 additions and 98 deletions

View File

@ -89,9 +89,7 @@ fn main() {
let indexer_alloc = Bump::new();
let embedders = EmbeddingConfigs::default();
let mut indexer = indexer::DocumentOperation::new(
IndexDocumentsMethod::ReplaceDocuments,
);
let mut indexer = indexer::DocumentOperation::new();
let mut operations = Vec::new();
for op in batch.0 {
@ -115,7 +113,7 @@ fn main() {
for op in &operations {
match op {
Either::Left(documents) => {
indexer.add_documents(documents).unwrap()
indexer.replace_documents(documents).unwrap()
}
Either::Right(ids) => indexer.delete_documents(ids),
}