mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
fix encoding bug
This commit is contained in:
parent
2716c1aebb
commit
99551fc21b
9 changed files with 34 additions and 41 deletions
|
@ -298,18 +298,14 @@ impl Index {
|
|||
|
||||
pub fn delete_documents(
|
||||
&self,
|
||||
document_ids: Option<impl io::Read>,
|
||||
document_ids: Vec<String>,
|
||||
update_builder: UpdateBuilder,
|
||||
) -> anyhow::Result<UpdateResult> {
|
||||
let ids = match document_ids {
|
||||
Some(reader) => serde_json::from_reader(reader)?,
|
||||
None => Vec::<String>::new(),
|
||||
};
|
||||
let mut txn = self.write_txn()?;
|
||||
let mut builder = update_builder.delete_documents(&mut txn, self)?;
|
||||
|
||||
// We ignore unexisting document ids
|
||||
ids.iter().for_each(|id| {
|
||||
document_ids.iter().for_each(|id| {
|
||||
builder.delete_external_id(id);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue