#[non_exhaustive]pub struct FtsPropertyPathSpec {
pub path: String,
pub mode: FtsPropertyPathMode,
pub weight: Option<f32>,
}Expand description
A single registered property-FTS path with its extraction mode.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.path: StringJSON path to the property (must start with $.).
mode: FtsPropertyPathModeWhether to treat this path as a scalar or recursively walk it.
weight: Option<f32>Optional BM25 weight multiplier for this path (1.0 = default).
Must satisfy 0.0 < weight <= 1000.0 when set.
Implementations§
Source§impl FtsPropertyPathSpec
impl FtsPropertyPathSpec
pub fn scalar(path: impl Into<String>) -> FtsPropertyPathSpec
pub fn recursive(path: impl Into<String>) -> FtsPropertyPathSpec
Sourcepub fn with_weight(self, weight: f32) -> FtsPropertyPathSpec
pub fn with_weight(self, weight: f32) -> FtsPropertyPathSpec
Set the BM25 weight multiplier for this path.
The weight must satisfy 0.0 < weight <= 1000.0 at registration
time; this builder method does not validate — validation happens in
register_fts_property_schema_with_entries.
Trait Implementations§
Source§impl Clone for FtsPropertyPathSpec
impl Clone for FtsPropertyPathSpec
Source§fn clone(&self) -> FtsPropertyPathSpec
fn clone(&self) -> FtsPropertyPathSpec
Returns a duplicate of the value. Read more
1.0.0 · 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 FtsPropertyPathSpec
impl Debug for FtsPropertyPathSpec
Source§impl From<PyPropertyPathSpec> for FtsPropertyPathSpec
impl From<PyPropertyPathSpec> for FtsPropertyPathSpec
Source§fn from(value: PyPropertyPathSpec) -> Self
fn from(value: PyPropertyPathSpec) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FtsPropertyPathSpec
impl PartialEq for FtsPropertyPathSpec
Source§impl Serialize for FtsPropertyPathSpec
impl Serialize for FtsPropertyPathSpec
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for FtsPropertyPathSpec
impl StructuralPartialEq for FtsPropertyPathSpec
Auto Trait Implementations§
impl Freeze for FtsPropertyPathSpec
impl RefUnwindSafe for FtsPropertyPathSpec
impl Send for FtsPropertyPathSpec
impl Sync for FtsPropertyPathSpec
impl Unpin for FtsPropertyPathSpec
impl UnsafeUnpin for FtsPropertyPathSpec
impl UnwindSafe for FtsPropertyPathSpec
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.