mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
fix the field distribution when upgrading from the v1_12
This commit is contained in:
parent
cfc1e193b6
commit
20ac59c946
5 changed files with 59 additions and 13 deletions
29
crates/milli/src/update/upgrade/v1_12.rs
Normal file
29
crates/milli/src/update/upgrade/v1_12.rs
Normal file
|
@ -0,0 +1,29 @@
|
|||
use heed::RwTxn;
|
||||
|
||||
use crate::{make_enum_progress, Result};
|
||||
|
||||
use crate::{progress::Progress, Index};
|
||||
|
||||
// The field distribution was not computed correctly in the v1.12 until the v1.12.3
|
||||
pub(super) fn v1_12_to_v1_12_3(
|
||||
wtxn: &mut RwTxn,
|
||||
index: &Index,
|
||||
progress: Progress,
|
||||
) -> Result<bool> {
|
||||
make_enum_progress! {
|
||||
enum FieldDistribution {
|
||||
RebuildingFieldDistribution,
|
||||
}
|
||||
};
|
||||
progress.update_progress(FieldDistribution::RebuildingFieldDistribution);
|
||||
crate::update::new::reindex::field_distribution(index, wtxn, &progress)?;
|
||||
Ok(true)
|
||||
}
|
||||
|
||||
pub(super) fn v1_12_3_to_v1_13(
|
||||
_wtxn: &mut RwTxn,
|
||||
_index: &Index,
|
||||
_progress: Progress,
|
||||
) -> Result<bool> {
|
||||
Ok(false)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue