pub struct BinaryScannSegment { /* private fields */ }Expand description
Immutable segment-local exact binary payload.
Implementations§
Source§impl BinaryScannSegment
impl BinaryScannSegment
pub fn build( model: &BinaryScannModel, codes: &[u8], doc_id_ordinals: &[(u32, u16)], scratch: &mut BinaryScannSearchScratch, ) -> ScannResult<Self>
Sourcepub fn build_with_soar(
model: &BinaryScannModel,
codes: &[u8],
doc_id_ordinals: &[(u32, u16)],
soar: &SoarConfig,
scratch: &mut BinaryScannSearchScratch,
) -> ScannResult<Self>
pub fn build_with_soar( model: &BinaryScannModel, codes: &[u8], doc_id_ordinals: &[(u32, u16)], soar: &SoarConfig, scratch: &mut BinaryScannSearchScratch, ) -> ScannResult<Self>
Build with deterministic one-secondary binary spilling.
A negative spill_threshold keeps SoarConfig’s target-fraction tag:
the most poorly represented primary assignments are retained up to a
strict segment-local storage budget. Explicit non-negative thresholds
use the same primary residual rule as float SOAR, with squared L2 over
bits represented exactly by Hamming distance.
Sourcepub fn merge_compatible(
model: &BinaryScannModel,
segments: &[(&Self, u32)],
) -> ScannResult<Self>
pub fn merge_compatible( model: &BinaryScannModel, segments: &[(&Self, u32)], ) -> ScannResult<Self>
Leaf-wise compatible merge. Codes are copied verbatim and no routing or training runs; only segment-local document IDs are rebased.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn stored_len(&self) -> usize
pub fn stored_len(&self) -> usize
Number of physical leaf postings after secondary spill expansion.
pub fn to_payload( &self, model: &BinaryScannModel, artifact: &ScannTrainedArtifact, doc_count: u32, ) -> ScannResult<ScannSegmentPayload>
Trait Implementations§
Source§impl Clone for BinaryScannSegment
impl Clone for BinaryScannSegment
Source§fn clone(&self) -> BinaryScannSegment
fn clone(&self) -> BinaryScannSegment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BinaryScannSegment
impl RefUnwindSafe for BinaryScannSegment
impl Send for BinaryScannSegment
impl Sync for BinaryScannSegment
impl Unpin for BinaryScannSegment
impl UnsafeUnpin for BinaryScannSegment
impl UnwindSafe for BinaryScannSegment
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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