fix the tests and the arroy_readers method

This commit is contained in:
Tamo 2024-09-19 10:32:17 +02:00
parent cc45e264ca
commit 79f29eed3c
13 changed files with 39 additions and 40 deletions

View file

@ -997,9 +997,14 @@ impl<'a, 'i> Transform<'a, 'i> {
if let Some(WriteBackToDocuments { embedder_id, user_provided }) =
action.write_back()
{
let readers: Vec<_> =
self.index.arroy_readers(*embedder_id, action.was_quantized).collect();
Some(Ok((name.as_str(), (readers, user_provided))))
let readers: Result<Vec<_>> = self
.index
.arroy_readers(wtxn, *embedder_id, action.was_quantized)
.collect();
match readers {
Ok(readers) => Some(Ok((name.as_str(), (readers, user_provided)))),
Err(error) => Some(Err(error)),
}
} else {
None
}