Update crates/milli/src/update/new/extract/faceted/extract_facets.rs

Co-authored-by: Many the fish <many@meilisearch.com>
This commit is contained in:
Nate Nethercott 2025-05-28 15:38:23 +02:00 committed by GitHub
parent 44f812c36d
commit b06cc1e0a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -91,7 +91,8 @@ impl FacetedDocidsExtractor {
let mut del_add_facet_value = DelAddFacetValue::new(&context.doc_alloc); let mut del_add_facet_value = DelAddFacetValue::new(&context.doc_alloc);
let docid = document_change.docid(); let docid = document_change.docid();
// Macro expanding to an insertion/deletion facet fn // Macro expanding to an insertion/deletion facet fn,
// using a macro avoid to borrow the parameters as mutable in both closures at the same time by postponing their creation
macro_rules! facet_fn { macro_rules! facet_fn {
(del) => { (del) => {
|fid: FieldId, meta: Metadata, depth: perm_json_p::Depth, value: &Value| { |fid: FieldId, meta: Metadata, depth: perm_json_p::Depth, value: &Value| {