it probably works but it's also horrendous

This commit is contained in:
Irevoire
2022-10-19 18:27:18 +02:00
committed by Clément Renault
parent d20b5ddda0
commit d9218578e3
3 changed files with 535 additions and 232 deletions

View File

@ -130,6 +130,10 @@ impl IndexMapper {
Ok(())
}
pub fn exists(&self, rtxn: &RoTxn, name: &str) -> Result<bool> {
Ok(self.index_mapping.get(rtxn, name)?.is_some())
}
/// Return an index, may open it if it wasn't already opened.
pub fn index(&self, rtxn: &RoTxn, name: &str) -> Result<Index> {
let uuid = self