mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 16:51:01 +00:00
Make sure that meilisearch-http works without index wrapper
This commit is contained in:
committed by
Clément Renault
parent
b7898cd4ab
commit
4871509507
@ -104,12 +104,14 @@ impl IndexMapper {
|
||||
Ok(index)
|
||||
}
|
||||
|
||||
pub fn indexes(&self, rtxn: &RoTxn) -> Result<Vec<Index>> {
|
||||
pub fn indexes(&self, rtxn: &RoTxn) -> Result<Vec<(String, Index)>> {
|
||||
self.index_mapping
|
||||
.iter(rtxn)?
|
||||
.map(|ret| {
|
||||
ret.map_err(Error::from)
|
||||
.and_then(|(name, _)| self.index(rtxn, name))
|
||||
ret.map_err(Error::from).and_then(|(name, _)| {
|
||||
self.index(rtxn, name)
|
||||
.map(|index| (name.to_string(), index))
|
||||
})
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ impl IndexScheduler {
|
||||
}
|
||||
|
||||
/// Return and open all the indexes.
|
||||
pub fn indexes(&self) -> Result<Vec<Index>> {
|
||||
pub fn indexes(&self) -> Result<Vec<(String, Index)>> {
|
||||
let rtxn = self.env.read_txn()?;
|
||||
self.index_mapper.indexes(&rtxn)
|
||||
}
|
||||
|
Reference in New Issue
Block a user