pub struct RecallFtsGatherConfig {
pub enabled: bool,
pub term_k: usize,
pub selection_rule: RecallFtsSelectionRule,
pub gather_mode: RecallFtsGatherMode,
pub gather_limit: Option<u32>,
pub gather_cap_multiplier: u32,
pub cjk_bypass_ranked: bool,
}Expand description
Configuration for the FTS candidate-gather optimization (default: disabled, existing behavior).
Fields§
§enabled: boolEnable the candidate-gather optimization. Default false = existing behavior.
term_k: usizeMax query terms to send to FTS after selection. Default 10 (existing fanout limit).
selection_rule: RecallFtsSelectionRuleHow to select the K terms. Default original (existing order).
gather_mode: RecallFtsGatherModeHow the DB gathers candidates. Default ranked (existing behavior).
gather_limit: Option<u32>Row cap for RankWithinCap gather. When None, uses candidate_limit * gather_cap_multiplier.
gather_cap_multiplier: u32Multiplier for gather_limit when gather_limit is None. Default 4.
cjk_bypass_ranked: boolWhen true, CJK queries bypass term selection and use the existing ranked all-term path.
Implementations§
Source§impl RecallFtsGatherConfig
impl RecallFtsGatherConfig
Sourcepub fn from_env() -> Result<Option<Self>, RuntimeError>
pub fn from_env() -> Result<Option<Self>, RuntimeError>
Parse gather config from env vars. Returns None when none are set, Err on malformed values.
Sourcepub fn validate(&self) -> Result<(), RuntimeError>
pub fn validate(&self) -> Result<(), RuntimeError>
Validate the config for internal consistency.
Sourcepub fn effective_gather_limit(
&self,
candidate_limit: u32,
) -> Result<u32, RuntimeError>
pub fn effective_gather_limit( &self, candidate_limit: u32, ) -> Result<u32, RuntimeError>
Compute the effective gather_limit for a given candidate_limit.
Sourcepub fn to_search_options(
&self,
candidate_limit: u32,
) -> Result<TextSearchOptions, RuntimeError>
pub fn to_search_options( &self, candidate_limit: u32, ) -> Result<TextSearchOptions, RuntimeError>
Convert to DB-level TextSearchOptions for a given candidate_limit.
Trait Implementations§
Source§impl Clone for RecallFtsGatherConfig
impl Clone for RecallFtsGatherConfig
Source§fn clone(&self) -> RecallFtsGatherConfig
fn clone(&self) -> RecallFtsGatherConfig
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 RecallFtsGatherConfig
impl Debug for RecallFtsGatherConfig
Source§impl Default for RecallFtsGatherConfig
impl Default for RecallFtsGatherConfig
Source§impl<'de> Deserialize<'de> for RecallFtsGatherConfigwhere
RecallFtsGatherConfig: Default,
impl<'de> Deserialize<'de> for RecallFtsGatherConfigwhere
RecallFtsGatherConfig: 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 RecallFtsGatherConfig
impl RefUnwindSafe for RecallFtsGatherConfig
impl Send for RecallFtsGatherConfig
impl Sync for RecallFtsGatherConfig
impl Unpin for RecallFtsGatherConfig
impl UnsafeUnpin for RecallFtsGatherConfig
impl UnwindSafe for RecallFtsGatherConfig
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
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>,
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