mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 02:27:40 +08:00
while retrieving the readers on an arroywrapper, stops at the first empty reader
This commit is contained in:
parent
7f048b9732
commit
b31e9bea26
@ -56,7 +56,11 @@ impl ArroyWrapper {
|
|||||||
) -> impl Iterator<Item = Result<arroy::Reader<D>, arroy::Error>> + 'a {
|
) -> impl Iterator<Item = Result<arroy::Reader<D>, arroy::Error>> + 'a {
|
||||||
arroy_db_range_for_embedder(self.embedder_index).map_while(move |index| {
|
arroy_db_range_for_embedder(self.embedder_index).map_while(move |index| {
|
||||||
match arroy::Reader::open(rtxn, index, db) {
|
match arroy::Reader::open(rtxn, index, db) {
|
||||||
Ok(reader) => Some(Ok(reader)),
|
Ok(reader) => match reader.is_empty(rtxn) {
|
||||||
|
Ok(false) => Some(Ok(reader)),
|
||||||
|
Ok(true) => None,
|
||||||
|
Err(e) => Some(Err(e)),
|
||||||
|
},
|
||||||
Err(arroy::Error::MissingMetadata(_)) => None,
|
Err(arroy::Error::MissingMetadata(_)) => None,
|
||||||
Err(e) => Some(Err(e)),
|
Err(e) => Some(Err(e)),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user