mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
start integrating the index-scheduler in meilisearch-lib
This commit is contained in:
parent
01847a14bb
commit
acc6d3a82b
7 changed files with 163 additions and 146 deletions
|
@ -107,6 +107,16 @@ impl IndexMapper {
|
|||
Ok(index)
|
||||
}
|
||||
|
||||
pub fn indexes(&self, rtxn: &RoTxn) -> Result<Vec<Index>> {
|
||||
self.index_mapping
|
||||
.iter(&rtxn)?
|
||||
.map(|ret| {
|
||||
ret.map_err(Error::from)
|
||||
.and_then(|(name, _)| self.index(rtxn, name))
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// Swap two index name.
|
||||
pub fn swap(&self, wtxn: &mut RwTxn, lhs: &str, rhs: &str) -> Result<()> {
|
||||
let lhs_uuid = self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue