mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Introduce a new route to export documents and enqueue the export task
This commit is contained in:
parent
ae8c1461e1
commit
e74c3b692a
14 changed files with 303 additions and 10 deletions
|
@ -4,6 +4,7 @@ use std::io;
|
|||
use dump::{KindDump, TaskDump, UpdateFile};
|
||||
use meilisearch_types::batches::{Batch, BatchId};
|
||||
use meilisearch_types::heed::RwTxn;
|
||||
use meilisearch_types::index_uid_pattern::IndexUidPattern;
|
||||
use meilisearch_types::milli;
|
||||
use meilisearch_types::tasks::{Kind, KindWithContent, Status, Task};
|
||||
use roaring::RoaringBitmap;
|
||||
|
@ -211,6 +212,19 @@ impl<'a> Dump<'a> {
|
|||
KindWithContent::DumpCreation { keys, instance_uid }
|
||||
}
|
||||
KindDump::SnapshotCreation => KindWithContent::SnapshotCreation,
|
||||
KindDump::Export { url, indexes, skip_embeddings, api_key } => {
|
||||
KindWithContent::Export {
|
||||
url,
|
||||
indexes: indexes
|
||||
.into_iter()
|
||||
.map(|index| {
|
||||
IndexUidPattern::try_from(index).map_err(|_| Error::CorruptedDump)
|
||||
})
|
||||
.collect::<Result<Vec<_>, Error>>()?,
|
||||
skip_embeddings,
|
||||
api_key,
|
||||
}
|
||||
}
|
||||
KindDump::UpgradeDatabase { from } => KindWithContent::UpgradeDatabase { from },
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue