Returns the `Collection` by collection's name If not found, None is returned Note that it tried to look up the Collections in the DashMap only and doesn't check LMDB. This is because of the assumption that at startup, all collections will be loaded from LMDB into the in-memory DashMap and when a new collection is added, it will be written to the DashMap as well. @TODO: As a future improvement,
(&self, name: &str)
| 1356 | /// the Collection exists in LMDB and caching it. But it's not |
| 1357 | /// required for the current use case. |
| 1358 | pub fn get_collection(&self, name: &str) -> Option<Arc<Collection>> { |
| 1359 | self.inner_collections.get(name).map(|index| index.clone()) |
| 1360 | } |
| 1361 | |
| 1362 | pub fn remove_hnsw_index(&self, name: &str) -> Result<Option<Arc<HNSWIndex>>, WaCustomError> { |
| 1363 | match self.inner_collections.get(name) { |