mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 08:41:00 +00:00
feat: Introduce documents addition using the update system
This commit is contained in:
committed by
Clément Renault
parent
5a9e25c315
commit
f83d6df4ef
@ -6,7 +6,6 @@ use std::io::{self, BufRead, BufReader};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::time::Instant;
|
||||
use std::error::Error;
|
||||
use std::borrow::Cow;
|
||||
use std::fs::File;
|
||||
|
||||
use diskus::Walk;
|
||||
@ -44,9 +43,8 @@ pub struct Opt {
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
struct Document<'a> (
|
||||
#[serde(borrow)]
|
||||
HashMap<Cow<'a, str>, Cow<'a, str>>
|
||||
struct Document (
|
||||
HashMap<String, String>
|
||||
);
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
@ -138,7 +136,7 @@ fn index(
|
||||
}
|
||||
};
|
||||
|
||||
update.update_document(&document)?;
|
||||
update.update_document(document);
|
||||
|
||||
print!("\rindexing document {}", i);
|
||||
i += 1;
|
||||
|
Reference in New Issue
Block a user