pub trait StreamingIndex {
// Required methods
fn apply(&mut self, op: UpdateOp) -> Result<()>;
fn apply_batch(&mut self, batch: UpdateBatch) -> Result<UpdateStats>;
fn compact(&mut self) -> Result<UpdateStats>;
fn stats(&self) -> StreamingStats;
}Expand description
Trait for indices that support streaming updates.
Required Methods§
Sourcefn apply_batch(&mut self, batch: UpdateBatch) -> Result<UpdateStats>
fn apply_batch(&mut self, batch: UpdateBatch) -> Result<UpdateStats>
Apply a batch of updates atomically.
Sourcefn compact(&mut self) -> Result<UpdateStats>
fn compact(&mut self) -> Result<UpdateStats>
Compact/merge buffered updates into main index.
Sourcefn stats(&self) -> StreamingStats
fn stats(&self) -> StreamingStats
Get streaming statistics.