pub struct SourceRebuild { /* private fields */ }Expand description
A source rebuild of a text index staged before it is written: documents are staged in ascending identity order, then visited by field record and by cluster in the order the index stores them.
Implementations§
Source§impl SourceRebuild
impl SourceRebuild
pub fn new(control: &StorageReadControl) -> Self
Sourcepub fn stage<'a>(
&mut self,
doc_id: DocId,
fields: impl IntoIterator<Item = StagedFields<'a>>,
) -> StorageBackendResult<()>
pub fn stage<'a>( &mut self, doc_id: DocId, fields: impl IntoIterator<Item = StagedFields<'a>>, ) -> StorageBackendResult<()>
Stage document doc_id with its analyzed fields. Documents are staged in strictly ascending identity order.
Sourcepub fn totals(&self) -> &BTreeMap<FieldName, FieldTotals>
pub fn totals(&self) -> &BTreeMap<FieldName, FieldTotals>
The indexed documents and total length of each staged field.
Sourcepub fn visit_documents(
&self,
visit: &mut dyn FnMut(StagedFieldRecord<'_>) -> StorageBackendResult<()>,
) -> StorageBackendResult<()>
pub fn visit_documents( &self, visit: &mut dyn FnMut(StagedFieldRecord<'_>) -> StorageBackendResult<()>, ) -> StorageBackendResult<()>
Visit the staged field records in order of document and field, each with its metadata and the encoded keys of its terms.
Sourcepub fn visit_clusters(
&self,
visit: &mut dyn FnMut(StagedCluster<'_>) -> StorageBackendResult<()>,
) -> StorageBackendResult<()>
pub fn visit_clusters( &self, visit: &mut dyn FnMut(StagedCluster<'_>) -> StorageBackendResult<()>, ) -> StorageBackendResult<()>
Visit the staged postings as clusters in order of field, term and cluster, each with its encoded score and positions values.
Auto Trait Implementations§
impl !RefUnwindSafe for SourceRebuild
impl !UnwindSafe for SourceRebuild
impl Freeze for SourceRebuild
impl Send for SourceRebuild
impl Sync for SourceRebuild
impl Unpin for SourceRebuild
impl UnsafeUnpin for SourceRebuild
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more