pub struct SearchQuery {
pub text: String,
pub filters: Vec<(String, String)>,
pub limit: u32,
pub offset: u32,
}Expand description
A query to issue against a named index.
Deliberately minimal — see the module docs for the rationale.
Fields§
§text: StringFree-form text query. Empty string means “match all”, subject to filters. Backends may also accept a raw DSL here if they choose.
filters: Vec<(String, String)>Attribute equality filters, applied as AND. Each pair is
(field, value) — backends translate them to their native filter
shape (attribute = "value" for Meili, WHERE col = $1 for pg).
Richer filter trees are out of scope for the shared shape.
limit: u32Maximum number of hits to return. 0 means “use the backend’s
default”. Callers that want a cap should set an explicit value.
offset: u32Number of hits to skip from the start — pagination cursor.
Trait Implementations§
Source§impl Clone for SearchQuery
impl Clone for SearchQuery
Source§fn clone(&self) -> SearchQuery
fn clone(&self) -> SearchQuery
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 SearchQuery
impl Debug for SearchQuery
Source§impl Default for SearchQuery
impl Default for SearchQuery
Source§fn default() -> SearchQuery
fn default() -> SearchQuery
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SearchQuery
impl<'de> Deserialize<'de> for SearchQuery
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 SearchQuery
impl RefUnwindSafe for SearchQuery
impl Send for SearchQuery
impl Sync for SearchQuery
impl Unpin for SearchQuery
impl UnsafeUnpin for SearchQuery
impl UnwindSafe for SearchQuery
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