This commit is contained in:
2023-01-16 10:25:08 +01:00
parent 84e38d3613
commit 30f8f47c69
3 changed files with 43 additions and 87 deletions

View File

@@ -63,7 +63,7 @@ pub struct Author {
pub middle_name: String,
pub author_langs: Vec<String>,
pub translator_langs: Vec<String>,
pub books_count: i32,
pub books_count: i64,
}
impl UpdateModel for Author {
@@ -140,7 +140,7 @@ pub struct Sequence {
pub id: i32,
pub name: String,
pub langs: Vec<String>,
pub books_count: i32
pub books_count: i64
}
impl UpdateModel for Sequence {
@@ -201,8 +201,8 @@ pub struct Genre {
pub id: i32,
pub description: String,
pub meta: String,
pub langs: String,
pub books_count: String,
pub langs: Vec<String>,
pub books_count: i64,
}
impl UpdateModel for Genre {

View File

@@ -63,7 +63,7 @@ where
})
.collect();
if let Err(err) = index.add_documents(&items, Some("id")).await {
if let Err(err) = index.add_or_replace(&items, Some("id")).await {
return Err(Box::new(err));
};
}