mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
fix the import of the dumpv4&v5 when there is no instance-uid + rename the Kind+KindWithContent+Details variant for the DocumentImport and the Setting
This commit is contained in:
parent
131fe30934
commit
8d1408c65e
14 changed files with 98 additions and 77 deletions
|
@ -255,7 +255,7 @@ async fn document_addition(
|
|||
}
|
||||
};
|
||||
|
||||
let task = KindWithContent::DocumentImport {
|
||||
let task = KindWithContent::DocumentAdditionOrUpdate {
|
||||
method,
|
||||
content_file: uuid,
|
||||
documents_count,
|
||||
|
|
|
@ -40,7 +40,7 @@ macro_rules! make_setting_route {
|
|||
let new_settings = Settings { $attr: Setting::Reset, ..Default::default() };
|
||||
|
||||
let allow_index_creation = index_scheduler.filters().allow_index_creation;
|
||||
let task = KindWithContent::Settings {
|
||||
let task = KindWithContent::SettingsUpdate {
|
||||
index_uid: index_uid.into_inner(),
|
||||
new_settings,
|
||||
is_deletion: true,
|
||||
|
@ -78,7 +78,7 @@ macro_rules! make_setting_route {
|
|||
};
|
||||
|
||||
let allow_index_creation = index_scheduler.filters().allow_index_creation;
|
||||
let task = KindWithContent::Settings {
|
||||
let task = KindWithContent::SettingsUpdate {
|
||||
index_uid: index_uid.into_inner(),
|
||||
new_settings,
|
||||
is_deletion: false,
|
||||
|
@ -436,7 +436,7 @@ pub async fn update_all(
|
|||
);
|
||||
|
||||
let allow_index_creation = index_scheduler.filters().allow_index_creation;
|
||||
let task = KindWithContent::Settings {
|
||||
let task = KindWithContent::SettingsUpdate {
|
||||
index_uid: index_uid.into_inner(),
|
||||
new_settings,
|
||||
is_deletion: false,
|
||||
|
@ -467,7 +467,7 @@ pub async fn delete_all(
|
|||
let new_settings = Settings::cleared().into_unchecked();
|
||||
|
||||
let allow_index_creation = index_scheduler.filters().allow_index_creation;
|
||||
let task = KindWithContent::Settings {
|
||||
let task = KindWithContent::SettingsUpdate {
|
||||
index_uid: index_uid.into_inner(),
|
||||
new_settings,
|
||||
is_deletion: true,
|
||||
|
|
|
@ -121,12 +121,14 @@ pub struct DetailsView {
|
|||
impl From<Details> for DetailsView {
|
||||
fn from(details: Details) -> Self {
|
||||
match details.clone() {
|
||||
Details::DocumentAddition { received_documents, indexed_documents } => DetailsView {
|
||||
received_documents: Some(received_documents),
|
||||
indexed_documents,
|
||||
..DetailsView::default()
|
||||
},
|
||||
Details::Settings { settings } => {
|
||||
Details::DocumentAdditionOrUpdate { received_documents, indexed_documents } => {
|
||||
DetailsView {
|
||||
received_documents: Some(received_documents),
|
||||
indexed_documents,
|
||||
..DetailsView::default()
|
||||
}
|
||||
}
|
||||
Details::SettingsUpdate { settings } => {
|
||||
DetailsView { settings: Some(settings), ..DetailsView::default() }
|
||||
}
|
||||
Details::IndexInfo { primary_key } => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue