pub struct CompactionPolicy {
pub enabled: bool,
pub min_cluster: usize,
pub similarity: f32,
pub max_confidence: f32,
pub max_confirmations: u32,
}Expand description
Cluster compaction (#971): the background cognition loop collapses piles of
low-value, mutually-similar facts into a single recoverable digest, so a busy
store’s live fact count actually drops instead of churning at its cap. It is
strictly guarded — only faded (< max_confidence), barely-confirmed
(<= max_confirmations), never-frequently/recently-retrieved facts in a
cluster of at least min_cluster qualify — and lossless, since the originals
are archived and rehydrate on recall.
Fields§
§enabled: boolMaster switch for cluster compaction in the cognition loop.
min_cluster: usizeMinimum number of facts in a same-category cluster before it is collapsed
into a digest. Must be >= 2.
similarity: f32Average word-Jaccard similarity (0.0–1.0) a fact needs to join a cluster.
max_confidence: f32Importance ceiling: only facts below this confidence are eligible, so a high-confidence fact is never compacted.
max_confirmations: u32Only facts confirmed at most this many times are eligible — a repeatedly-confirmed fact is structurally important and always kept.
Trait Implementations§
Source§impl Clone for CompactionPolicy
impl Clone for CompactionPolicy
Source§fn clone(&self) -> CompactionPolicy
fn clone(&self) -> CompactionPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompactionPolicy
impl Debug for CompactionPolicy
Source§impl Default for CompactionPolicy
impl Default for CompactionPolicy
Source§impl<'de> Deserialize<'de> for CompactionPolicywhere
CompactionPolicy: Default,
impl<'de> Deserialize<'de> for CompactionPolicywhere
CompactionPolicy: Default,
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>,
Auto Trait Implementations§
impl Freeze for CompactionPolicy
impl RefUnwindSafe for CompactionPolicy
impl Send for CompactionPolicy
impl Sync for CompactionPolicy
impl Unpin for CompactionPolicy
impl UnsafeUnpin for CompactionPolicy
impl UnwindSafe for CompactionPolicy
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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> ⓘ
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