pub struct SearchConfig {
pub index: &'static str,
pub primary_key: &'static str,
pub searchable_attributes: Vec<&'static str>,
pub filterable_attributes: Vec<&'static str>,
pub sortable_attributes: Vec<&'static str>,
}Expand description
Search configuration derived from a ModelSchema. Designed
to feed directly into MeiliClient::configure_index and
Indexer without touching the existing Searchable trait.
All names are &'static str because they come from
ModelColumn’s static-only fields (the contract is built at
compile time by #[derive(RustioModel)]). No allocation on
the lookup hot path.
Fields§
§index: &'static strMeili index name. Sourced from ModelSchema.search_index.
primary_key: &'static strPrimary-key field on every document. Sourced from
ModelSchema.primary_key.
searchable_attributes: Vec<&'static str>Attributes Meili tokenises for full-text queries. Order matches the schema’s declaration order — Meili weights the first attribute highest by default, so order matters.
filterable_attributes: Vec<&'static str>Attributes available for filter= queries.
sortable_attributes: Vec<&'static str>Attributes available for sort= queries.
Trait Implementations§
Source§impl Clone for SearchConfig
impl Clone for SearchConfig
Source§fn clone(&self) -> SearchConfig
fn clone(&self) -> SearchConfig
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 SearchConfig
impl Debug for SearchConfig
Source§impl PartialEq for SearchConfig
impl PartialEq for SearchConfig
impl Eq for SearchConfig
impl StructuralPartialEq for SearchConfig
Auto Trait Implementations§
impl Freeze for SearchConfig
impl RefUnwindSafe for SearchConfig
impl Send for SearchConfig
impl Sync for SearchConfig
impl Unpin for SearchConfig
impl UnsafeUnpin for SearchConfig
impl UnwindSafe for SearchConfig
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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<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