pub struct Transform<'a, 'i> {
pub index: &'i Index,
pub index_documents_method: IndexDocumentsMethod,
/* private fields */
}Expand description
Extract the external ids, deduplicate and compute the new internal documents ids and fields ids, writing all the documents under their internal ids into a final file.
Outputs the new FieldsIdsMap, the new UsersIdsDocumentsIds map, the new documents ids,
the replaced documents ids, the number of documents in this update and the file
containing all those documents.
Fields§
§index: &'i Index§index_documents_method: IndexDocumentsMethodImplementations§
Source§impl<'a, 'i> Transform<'a, 'i>
impl<'a, 'i> Transform<'a, 'i>
pub fn new( wtxn: &mut RwTxn<'_>, index: &'i Index, indexer_settings: &'a IndexerConfig, index_documents_method: IndexDocumentsMethod, _autogenerate_docids: bool, ) -> Result<Self>
pub fn read_documents<R, FP, FA>( &mut self, reader: EnrichedDocumentsBatchReader<R>, wtxn: &mut RwTxn<'_>, progress_callback: FP, should_abort: FA, ) -> Result<usize>
Sourcepub fn prepare_for_documents_reindexing(
self,
wtxn: &mut RwTxn<'i>,
settings_diff: InnerIndexSettingsDiff,
) -> Result<TransformOutput>
pub fn prepare_for_documents_reindexing( self, wtxn: &mut RwTxn<'i>, settings_diff: InnerIndexSettingsDiff, ) -> Result<TransformOutput>
Clear all databases. Returns a TransformOutput with a file that contains the documents
of the index with the attributes reordered accordingly to the FieldsIdsMap given as argument.
Auto Trait Implementations§
impl<'a, 'i> Freeze for Transform<'a, 'i>
impl<'a, 'i> !RefUnwindSafe for Transform<'a, 'i>
impl<'a, 'i> Send for Transform<'a, 'i>
impl<'a, 'i> Sync for Transform<'a, 'i>
impl<'a, 'i> Unpin for Transform<'a, 'i>
impl<'a, 'i> !UnwindSafe for Transform<'a, 'i>
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