pub struct TextColdDir { /* private fields */ }Expand description
The frozen text segments for one windowed full-text index on one shard, plus the bloom and tombstones that let a query skip or correct them without opening a file.
Implementations§
Source§impl TextColdDir
impl TextColdDir
Sourcepub fn cold_stats(&self, tokens: &[Vec<u8>]) -> (u64, u64, Vec<(Vec<u8>, u32)>)
pub fn cold_stats(&self, tokens: &[Vec<u8>]) -> (u64, u64, Vec<(Vec<u8>, u32)>)
Pass-1 contribution: summed LIVE docs/length plus per-token live df across every cold segment (one fence descent per token per segment; the doc/length halves are in-memory numbers, no I/O at all).
Sourcepub fn cold_page(&self, q: &ColdPageQuery<'_>) -> ColdPage
pub fn cold_page(&self, q: &ColdPageQuery<'_>) -> ColdPage
Pass-2 contribution: the clause-faithful cold page (see the module doc for what each clause does here).
Source§impl TextColdDir
impl TextColdDir
Sourcepub fn has_cold(&self) -> bool
pub fn has_cold(&self) -> bool
Whether any segment has been sealed. false lets a query stay
entirely in the live index.
Sourcepub fn on_row_write(&mut self, row_key: &[u8])
pub fn on_row_write(&mut self, row_key: &[u8])
The write path saw this row change: shadow its frozen entries and withdraw its statistics, exactly, in every segment that holds it (its forward record says which, and what to subtract).
Sourcepub fn freeze_batch(
&mut self,
ts: &mut TextSegment,
index_name: &[u8],
keys: &[Vec<u8>],
segs_dir: &Path,
) -> Result<bool, String>
pub fn freeze_batch( &mut self, ts: &mut TextSegment, index_name: &[u8], keys: &[Vec<u8>], segs_dir: &Path, ) -> Result<bool, String>
Freeze keys out of the hot text segment into one sealed
bucket segment. Failure leaves the hot segment SHRUNK but the
batch unfrozen on disk — acceptable for derived spill (the
entries are rebuildable from rows), reported to the caller.