Introduce the EitherString/RevRange private aliases

This commit is contained in:
Kerollmops 2021-08-17 10:47:15 +02:00
parent 7a5889bc5a
commit 22ebd2658f
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -410,6 +410,10 @@ impl<'t> Iterator for FacetStringLevelZeroRevRange<'t> {
} }
} }
type EitherStringRange<'t> = Either<FacetStringGroupRange<'t>, FacetStringLevelZeroRange<'t>>;
type EitherStringRevRange<'t> =
Either<FacetStringGroupRevRange<'t>, FacetStringLevelZeroRevRange<'t>>;
/// An iterator that is used to explore the facet strings level by level, /// An iterator that is used to explore the facet strings level by level,
/// it will only return facets strings that are associated with the /// it will only return facets strings that are associated with the
/// candidates documents ids given. /// candidates documents ids given.
@ -417,8 +421,7 @@ pub struct FacetStringIter<'t> {
rtxn: &'t heed::RoTxn<'t>, rtxn: &'t heed::RoTxn<'t>,
db: Database<ByteSlice, ByteSlice>, db: Database<ByteSlice, ByteSlice>,
field_id: FieldId, field_id: FieldId,
level_iters: level_iters: Vec<(RoaringBitmap, EitherStringRange<'t>)>,
Vec<(RoaringBitmap, Either<FacetStringGroupRange<'t>, FacetStringLevelZeroRange<'t>>)>,
must_reduce: bool, must_reduce: bool,
} }