diff --git a/milli/src/update/index_documents/cache.rs b/milli/src/update/index_documents/cache.rs index 1c9079b1f..dc4404ab2 100644 --- a/milli/src/update/index_documents/cache.rs +++ b/milli/src/update/index_documents/cache.rs @@ -210,6 +210,10 @@ where } pub fn direct_insert(&mut self, key: &[u8], val: &[u8]) -> Result<(), grenad::Error> { + self.cbo_buffer.clear(); + self.cbo_buffer.extend_from_slice(self.prefix); + self.cbo_buffer.extend_from_slice(key); + self.conn.merge(&self.cbo_buffer, 1u32.to_ne_bytes()).unwrap(); self.sorter.insert(key, val) }