mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
fix the tests and the arroy_readers method
This commit is contained in:
parent
cc45e264ca
commit
79f29eed3c
13 changed files with 39 additions and 40 deletions
|
@ -1612,11 +1612,20 @@ impl Index {
|
|||
|
||||
pub fn arroy_readers<'a>(
|
||||
&'a self,
|
||||
rtxn: &'a RoTxn<'a>,
|
||||
embedder_id: u8,
|
||||
quantized: bool,
|
||||
) -> impl Iterator<Item = ArroyReader> + 'a {
|
||||
crate::vector::arroy_db_range_for_embedder(embedder_id)
|
||||
.map_while(move |k| Some(ArroyReader::new(self.vector_arroy, k, quantized)))
|
||||
) -> impl Iterator<Item = Result<ArroyReader>> + 'a {
|
||||
crate::vector::arroy_db_range_for_embedder(embedder_id).map_while(move |k| {
|
||||
let reader = ArroyReader::new(self.vector_arroy, k, quantized);
|
||||
// Here we don't care about the dimensions, but we want to know if we can read
|
||||
// in the database or if its medata are missing.
|
||||
match reader.dimensions(rtxn) {
|
||||
Ok(_) => Some(Ok(reader)),
|
||||
Err(arroy::Error::MissingMetadata(_)) => None,
|
||||
Err(e) => Some(Err(e.into())),
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
pub(crate) fn put_search_cutoff(&self, wtxn: &mut RwTxn<'_>, cutoff: u64) -> heed::Result<()> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue