pub struct DocumentChangeContext<'doc, 'extractor: 'doc, 'fid: 'doc, 'indexer: 'doc, T: MostlySend> {
pub index: &'indexer Index,
pub db_fields_ids_map: &'indexer FieldsIdsMap,
pub rtxn: RoTxn<'indexer, WithoutTls>,
pub new_fields_ids_map: &'doc RefCell<GlobalFieldsIdsMap<'fid>>,
pub doc_alloc: Bump,
pub extractor_alloc: &'extractor Bump,
pub data: &'doc T,
/* private fields */
}Fields§
§index: &'indexer IndexThe index we’re indexing in
db_fields_ids_map: &'indexer FieldsIdsMapThe fields ids map as it was at the start of this indexing process. Contains at least all top-level fields from documents inside of the DB.
rtxn: RoTxn<'indexer, WithoutTls>A transaction providing data from the DB before all indexing operations
new_fields_ids_map: &'doc RefCell<GlobalFieldsIdsMap<'fid>>Global field id map that is up to date with the current state of the indexing process.
- Inserting a field will take a lock
- Retrieving a field may take a lock as well
doc_alloc: BumpData allocated in this allocator is cleared between each call to process.
extractor_alloc: &'extractor BumpData allocated in this allocator is not cleared between each call to process, unless the data spills.
data: &'doc TExtractor-specific data
Implementations§
Source§impl<'doc, 'data: 'doc, 'extractor: 'doc, 'fid: 'doc, 'indexer: 'doc, T: MostlySend> DocumentChangeContext<'doc, 'extractor, 'fid, 'indexer, T>
impl<'doc, 'data: 'doc, 'extractor: 'doc, 'fid: 'doc, 'indexer: 'doc, T: MostlySend> DocumentChangeContext<'doc, 'extractor, 'fid, 'indexer, T>
pub fn new<F>( index: &'indexer Index, db_fields_ids_map: &'indexer FieldsIdsMap, new_fields_ids_map: &'fid RwLock<FieldIdMapWithMetadata>, extractor_allocs: &'extractor ThreadLocal<FullySend<Bump>>, doc_allocs: &'doc ThreadLocal<FullySend<Cell<Bump>>>, datastore: &'data ThreadLocal<T>, fields_ids_map_store: &'doc ThreadLocal<FullySend<RefCell<GlobalFieldsIdsMap<'fid>>>>, init_data: F, ) -> Result<Self>
Auto Trait Implementations§
impl<'doc, 'extractor, 'fid, 'indexer, T> !Freeze for DocumentChangeContext<'doc, 'extractor, 'fid, 'indexer, T>
impl<'doc, 'extractor, 'fid, 'indexer, T> !RefUnwindSafe for DocumentChangeContext<'doc, 'extractor, 'fid, 'indexer, T>
impl<'doc, 'extractor, 'fid, 'indexer, T> !Send for DocumentChangeContext<'doc, 'extractor, 'fid, 'indexer, T>
impl<'doc, 'extractor, 'fid, 'indexer, T> !Sync for DocumentChangeContext<'doc, 'extractor, 'fid, 'indexer, T>
impl<'doc, 'extractor, 'fid, 'indexer, T> Unpin for DocumentChangeContext<'doc, 'extractor, 'fid, 'indexer, T>
impl<'doc, 'extractor, 'fid, 'indexer, T> !UnwindSafe for DocumentChangeContext<'doc, 'extractor, 'fid, 'indexer, T>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more