mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
Fix PR comments
This commit is contained in:
parent
f014e78684
commit
2e896f30a5
4 changed files with 54 additions and 57 deletions
|
@ -1690,11 +1690,7 @@ impl Index {
|
|||
|
||||
pub fn prefix_settings(&self, rtxn: &RoTxn<'_>) -> Result<PrefixSettings> {
|
||||
let compute_prefixes = self.prefix_search(rtxn)?.unwrap_or_default();
|
||||
Ok(PrefixSettings {
|
||||
compute_prefixes,
|
||||
max_prefix_length: 4,
|
||||
prefix_count_threshold: 100,
|
||||
})
|
||||
Ok(PrefixSettings { compute_prefixes, max_prefix_length: 4, prefix_count_threshold: 100 })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -172,14 +172,15 @@ impl<'i> FacetsUpdate<'i> {
|
|||
incremental_update.execute(wtxn)?;
|
||||
}
|
||||
|
||||
if !self.index.facet_search(wtxn)? {
|
||||
// If facet search is disabled, we don't need to compute facet search databases.
|
||||
// We clear the facet search databases.
|
||||
self.index.facet_id_string_fst.clear(wtxn)?;
|
||||
self.index.facet_id_normalized_string_strings.clear(wtxn)?;
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
match self.normalized_delta_data {
|
||||
_ if !self.index.facet_search(wtxn)? => {
|
||||
// If facet search is disabled, we don't need to compute facet search databases.
|
||||
// We clear the facet search databases.
|
||||
self.index.facet_id_string_fst.clear(wtxn)?;
|
||||
self.index.facet_id_normalized_string_strings.clear(wtxn)?;
|
||||
Ok(())
|
||||
}
|
||||
Some(data) => index_facet_search(wtxn, data, self.index),
|
||||
None => Ok(()),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue