pub struct Update<'doc> { /* private fields */ }Implementations§
Source§impl<'doc> Update<'doc>
impl<'doc> Update<'doc>
pub fn create( docid: DocumentId, external_document_id: &'doc str, new: Versions<'doc>, from_scratch: bool, ) -> Self
pub fn docid(&self) -> DocumentId
pub fn external_document_id(&self) -> &'doc str
pub fn current<'a, Mapper: FieldIdMapper>( &self, rtxn: &'a RoTxn<'_>, index: &'a Index, mapper: &'a Mapper, ) -> Result<DocumentFromDb<'a, Mapper>>
pub fn current_vectors<'a, Mapper: FieldIdMapper>( &self, rtxn: &'a RoTxn<'_>, index: &'a Index, mapper: &'a Mapper, doc_alloc: &'a Bump, ) -> Result<VectorDocumentFromDb<'a>>
pub fn only_changed_fields(&self) -> DocumentFromVersions<'_, 'doc>
pub fn merged<'t, Mapper: FieldIdMapper>( &self, rtxn: &'t RoTxn<'_>, index: &'t Index, mapper: &'t Mapper, ) -> Result<MergedDocument<'_, 'doc, 't, Mapper>>
Sourcepub fn has_changed_for_fields<'t, Mapper: FieldIdMapper>(
&self,
selector: &mut impl FnMut(&str) -> PatternMatch,
rtxn: &'t RoTxn<'_>,
index: &'t Index,
mapper: &'t Mapper,
) -> Result<bool>
pub fn has_changed_for_fields<'t, Mapper: FieldIdMapper>( &self, selector: &mut impl FnMut(&str) -> PatternMatch, rtxn: &'t RoTxn<'_>, index: &'t Index, mapper: &'t Mapper, ) -> Result<bool>
Returns whether the updated version of the document is different from the current version for the subset of fields selected by selector.
true if at least one top-level-field that is exactly a selected field or a parent of a selected field changed.
Otherwise false.
- Note:
_geoand_vectorsare not taken into account by this function.
Sourcepub fn has_changed_for_geo_fields<'t, Mapper: FieldIdMapper>(
&self,
rtxn: &'t RoTxn<'_>,
index: &'t Index,
mapper: &'t Mapper,
) -> Result<bool>
pub fn has_changed_for_geo_fields<'t, Mapper: FieldIdMapper>( &self, rtxn: &'t RoTxn<'_>, index: &'t Index, mapper: &'t Mapper, ) -> Result<bool>
Returns true if the geo fields have changed.
pub fn only_changed_vectors( &self, doc_alloc: &'doc Bump, embedders: &'doc EmbeddingConfigs, ) -> Result<Option<VectorDocumentFromVersions<'doc>>>
pub fn merged_vectors<Mapper: FieldIdMapper>( &self, rtxn: &'doc RoTxn<'_>, index: &'doc Index, mapper: &'doc Mapper, doc_alloc: &'doc Bump, embedders: &'doc EmbeddingConfigs, ) -> Result<Option<MergedVectorDocument<'doc>>>
Auto Trait Implementations§
impl<'doc> Freeze for Update<'doc>
impl<'doc> !RefUnwindSafe for Update<'doc>
impl<'doc> !Send for Update<'doc>
impl<'doc> !Sync for Update<'doc>
impl<'doc> Unpin for Update<'doc>
impl<'doc> !UnwindSafe for Update<'doc>
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