From 5f8a82d6f55f6fc1066ac6be53e135b52e43c229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Tue, 19 Nov 2024 16:18:27 +0100 Subject: [PATCH] Improve test --- crates/milli/src/update/index_documents/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/milli/src/update/index_documents/mod.rs b/crates/milli/src/update/index_documents/mod.rs index 532e6cca5..148c3fe7b 100644 --- a/crates/milli/src/update/index_documents/mod.rs +++ b/crates/milli/src/update/index_documents/mod.rs @@ -1698,6 +1698,8 @@ mod tests { let colour_id = index.fields_ids_map(&rtxn).unwrap().id("colour").unwrap(); let colour_green_id = index.fields_ids_map(&rtxn).unwrap().id("colour.green").unwrap(); + let colour_green_blue_id = + index.fields_ids_map(&rtxn).unwrap().id("colour.green.blue").unwrap(); let bitmap_colour = index.facet_id_exists_docids.get(&rtxn, &colour_id).unwrap().unwrap(); @@ -1706,6 +1708,10 @@ mod tests { let bitmap_colour_green = index.facet_id_exists_docids.get(&rtxn, &colour_green_id).unwrap().unwrap(); assert_eq!(bitmap_colour_green.into_iter().collect::>(), vec![6, 7]); + + let bitmap_colour_blue = + index.facet_id_exists_docids.get(&rtxn, &colour_green_blue_id).unwrap().unwrap(); + assert_eq!(bitmap_colour_blue.into_iter().collect::>(), vec![7]); }; let faceted_fields = hashset!(S("colour"));