MeiliSearch/milli/src/search/distinct/mod.rs
Marin Postma 45c45e11dd
implement distinct attribute
distinct can return error

facet distinct on numbers

return distinct error

review fixes

make get_facet_value more generic

fixes
2021-04-15 16:25:55 +02:00

22 lines
563 B
Rust

mod facet_distinct;
mod map_distinct;
mod noop_distinct;
use roaring::RoaringBitmap;
pub use facet_distinct::FacetDistinct;
pub use map_distinct::MapDistinct;
pub use noop_distinct::NoopDistinct;
use crate::DocumentId;
pub trait DocIter: Iterator<Item=anyhow::Result<DocumentId>> {
/// Returns ownership on the internal RoaringBitmaps: (candidates, excluded)
fn into_excluded(self) -> RoaringBitmap;
}
pub trait Distinct<'a> {
type Iter: DocIter;
fn distinct(&'a mut self, candidates: RoaringBitmap, excluded: RoaringBitmap) -> Self::Iter;
}