use nodedb_types::TenantId;
use super::core::InvertedIndex;
impl InvertedIndex {
pub fn compact_commit(
&self,
tid: TenantId,
collection: &str,
new_segment_id: &str,
new_segment_data: &[u8],
merged_ids: &[String],
) -> crate::Result<()> {
self.inner.backend().compact_commit(
tid.as_u64(),
collection,
new_segment_id,
new_segment_data,
merged_ids,
)
}
pub fn list_all_fts_collections(&self) -> crate::Result<Vec<(TenantId, String)>> {
self.inner
.backend()
.list_all_fts_collections()
.map(|pairs| {
pairs
.into_iter()
.map(|(t, c)| (TenantId::new(t), c))
.collect()
})
}
}