Bump arroy to v0.2.0

This commit is contained in:
Clément Renault 2024-01-16 16:45:55 +01:00
parent cfaa522d68
commit 01e2c3d6bb
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
5 changed files with 8 additions and 11 deletions

View file

@ -251,6 +251,7 @@ impl From<arroy::Error> for Error {
arroy::Error::DatabaseFull
| arroy::Error::InvalidItemAppend
| arroy::Error::UnmatchingDistance { .. }
| arroy::Error::MissingNode
| arroy::Error::MissingMetadata => {
Error::InternalError(InternalError::ArroyError(value))
}

View file

@ -522,12 +522,8 @@ where
pool.install(|| {
let writer_index = (embedder_index as u16) << 8;
for k in 0..=u8::MAX {
let writer = arroy::Writer::prepare(
wtxn,
vector_arroy,
writer_index | (k as u16),
dimension,
)?;
let writer =
arroy::Writer::new(vector_arroy, writer_index | (k as u16), dimension)?;
if writer.is_empty(wtxn)? {
break;
}

View file

@ -372,8 +372,7 @@ pub(crate) fn write_typed_chunk_into_index(
// FIXME: allow customizing distance
let writers: std::result::Result<Vec<_>, _> = (0..=u8::MAX)
.map(|k| {
arroy::Writer::prepare(
wtxn,
arroy::Writer::new(
index.vector_arroy,
writer_index | (k as u16),
expected_dimension,