Write a raw segment blob directly into the FTS LSM segment store for a given `(tenant, collection)`. This bypasses the memtable flush path and is intended for maintenance tests and bootstrapping code that need to pre-populate a known number of L0 segments without indexing documents. In production code, segments are written automatically when the FTS memtable crosses its flush threshold.
(
&self,
tenant: crate::types::TenantId,
collection: &str,
segment_id: &str,
data: &[u8],
)
| 173 | /// segments are written automatically when the FTS memtable crosses its |
| 174 | /// flush threshold. |
| 175 | pub fn fts_write_segment( |
| 176 | &self, |
| 177 | tenant: crate::types::TenantId, |
| 178 | collection: &str, |
| 179 | segment_id: &str, |
| 180 | data: &[u8], |
| 181 | ) -> crate::Result<()> { |
| 182 | use nodedb_fts::backend::FtsBackend; |
| 183 | self.inverted |
| 184 | .backend() |
| 185 | .write_segment(tenant.as_u64(), collection, segment_id, data) |
| 186 | } |
| 187 | |
| 188 | /// Return the list of FTS LSM segment IDs for a `(tenant, collection)`. |
| 189 | /// |