pub struct AutoMergingConfig {
pub merge_threshold: f32,
pub leaf_chunk_size: usize,
pub parent_chunk_size: usize,
pub leaves_per_parent: usize,
}Expand description
AutoMerging 配置
Fields§
§merge_threshold: f32合并阈值:同一 Parent 下命中 Leaf 占比达到该比例时合并为 Parent 文档
leaf_chunk_size: usizeLeaf chunk 的大小(字符数)
parent_chunk_size: usizeParent chunk 的大小(字符数)
leaves_per_parent: usize每个 Parent 下期望的 Leaf 数量
Implementations§
Source§impl AutoMergingConfig
impl AutoMergingConfig
Sourcepub fn with_threshold(self, threshold: f32) -> Self
pub fn with_threshold(self, threshold: f32) -> Self
设置合并阈值
Sourcepub fn with_leaf_size(self, size: usize) -> Self
pub fn with_leaf_size(self, size: usize) -> Self
设置 Leaf chunk 大小
Sourcepub fn with_parent_size(self, size: usize) -> Self
pub fn with_parent_size(self, size: usize) -> Self
设置 Parent chunk 大小
Trait Implementations§
Source§impl Clone for AutoMergingConfig
impl Clone for AutoMergingConfig
Source§fn clone(&self) -> AutoMergingConfig
fn clone(&self) -> AutoMergingConfig
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 moreSource§impl Debug for AutoMergingConfig
impl Debug for AutoMergingConfig
Source§impl Default for AutoMergingConfig
impl Default for AutoMergingConfig
Source§impl<'de> Deserialize<'de> for AutoMergingConfig
impl<'de> Deserialize<'de> for AutoMergingConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AutoMergingConfig
impl RefUnwindSafe for AutoMergingConfig
impl Send for AutoMergingConfig
impl Sync for AutoMergingConfig
impl Unpin for AutoMergingConfig
impl UnsafeUnpin for AutoMergingConfig
impl UnwindSafe for AutoMergingConfig
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