From 77c97960e229bf60461c631877ebd4f2f0389642 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Thu, 2 Jan 2025 23:55:31 +0100 Subject: [PATCH] =?UTF-8?q?facet=5Fvalue=20starts=20at=20byte=204=20?= =?UTF-8?q?=F0=9F=91=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/milli/src/update/new/merger.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/milli/src/update/new/merger.rs b/crates/milli/src/update/new/merger.rs index 90fadd379..4a920a5f4 100644 --- a/crates/milli/src/update/new/merger.rs +++ b/crates/milli/src/update/new/merger.rs @@ -265,7 +265,8 @@ impl FacetFieldIdsDelta { fn extract_key_data<'key>(&self, key: &'key [u8]) -> (FacetKind, FieldId, &'key [u8]) { let facet_kind = FacetKind::from(key[0]); let field_id = FieldId::from_be_bytes([key[1], key[2]]); - let facet_value = &key[2..]; + // level is also stored in the key at [3] (always 0) + let facet_value = &key[4..]; (facet_kind, field_id, facet_value) }