From 3d8024fb2bdbd697b18452d8fe5599ff0f540d71 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Mon, 30 Sep 2024 11:35:03 +0200 Subject: [PATCH] write the weighted fields ids map --- milli/src/update/new/indexer/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/milli/src/update/new/indexer/mod.rs b/milli/src/update/new/indexer/mod.rs index b317aefca..19132b5db 100644 --- a/milli/src/update/new/indexer/mod.rs +++ b/milli/src/update/new/indexer/mod.rs @@ -17,6 +17,7 @@ use super::merger::merge_grenad_entries; use super::{StdResult, TopLevelMap}; use crate::documents::{PrimaryKey, DEFAULT_PRIMARY_KEY}; use crate::update::new::channel::ExtractorSender; +use crate::update::settings::InnerIndexSettings; use crate::update::GrenadParameters; use crate::{FieldsIdsMap, GlobalFieldsIdsMap, Index, Result, UserError}; @@ -245,6 +246,11 @@ where let fields_ids_map = fields_ids_map_lock.into_inner().unwrap(); index.put_fields_ids_map(wtxn, &fields_ids_map)?; + // used to update the localized and weighted maps while sharing the update code with the settings pipeline. + let mut inner_index_settings = InnerIndexSettings::from_index(index, wtxn)?; + inner_index_settings.recompute_facets(wtxn, index)?; + inner_index_settings.recompute_searchables(wtxn, index)?; + Ok(()) }