Reintroduce facet distribution functionality

This commit is contained in:
Loïc Lecrenier
2022-08-31 07:50:18 +02:00
committed by Loïc Lecrenier
parent b8a1caad5e
commit 5a904cf29d
3 changed files with 72 additions and 70 deletions

View File

@ -1,5 +1,5 @@
use crate::heed_codec::facet::new::{FacetGroupValueCodec, FacetKey, FacetKeyCodec, MyByteSlice};
use crate::Result;
use heed::Result;
use roaring::RoaringBitmap;
use std::ops::ControlFlow;
@ -20,7 +20,7 @@ where
get_highest_level(rtxn, &db.remap_key_type::<FacetKeyCodec<MyByteSlice>>(), field_id)?;
if let Some(first_bound) = get_first_facet_value::<MyByteSlice>(rtxn, db, field_id)? {
fd.iterate(candidates, highest_level, first_bound, usize::MAX);
fd.iterate(candidates, highest_level, first_bound, usize::MAX)?;
return Ok(());
} else {
return Ok(());