Test and implement settings opt-out

This commit is contained in:
ManyTheFish
2024-11-19 15:57:56 +01:00
parent 5560452ef9
commit d66dc363ed
36 changed files with 1018 additions and 94 deletions

View File

@ -445,7 +445,10 @@ where
(indexing_context.send_progress)(Progress::from_step(Step::PostProcessingFacets));
compute_facet_search_database(index, wtxn, global_fields_ids_map)?;
if index.facet_search(wtxn)? {
compute_facet_search_database(index, wtxn, global_fields_ids_map)?;
}
compute_facet_level_database(index, wtxn, facet_field_ids_delta)?;
(indexing_context.send_progress)(Progress::from_step(Step::PostProcessingWords));

View File

@ -80,12 +80,12 @@ pub struct PrefixDelta {
}
struct PrefixFstBuilder {
prefix_count_threshold: u64,
prefix_count_threshold: usize,
max_prefix_length: usize,
/// TODO: Replace the full memory allocation
prefix_fst_builders: Vec<SetBuilder<Vec<u8>>>,
current_prefix: Vec<Prefix>,
current_prefix_count: Vec<u64>,
current_prefix_count: Vec<usize>,
modified_prefixes: HashSet<Prefix>,
current_prefix_is_modified: Vec<bool>,
}
@ -95,7 +95,7 @@ impl PrefixFstBuilder {
let PrefixSettings { prefix_count_threshold, max_prefix_length, compute_prefixes } =
prefix_settings;
if !compute_prefixes {
if compute_prefixes != crate::index::PrefixSearch::IndexingTime {
return None;
}