Document that the LevelEntry fields order is important

This commit is contained in:
Clément Renault 2023-06-28 14:35:36 +02:00
parent 0b97596c93
commit 7c157fc442
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -56,6 +56,9 @@ pub fn count_iterate_over_facet_distribution<'t, CB>(
where
CB: FnMut(&'t [u8], u64, DocumentId) -> Result<ControlFlow<()>>,
{
/// # Important
/// The order of the fields determines the order in which the facet values will be returned.
/// This struct is inserted in a BinaryHeap and popped later on.
#[derive(Debug, PartialOrd, Ord, PartialEq, Eq)]
struct LevelEntry<'t> {
/// The number of candidates in this entry.