pub struct SearchQuery {
pub query: String,
pub filters: HashMap<String, Value>,
pub facets: Vec<String>,
pub sort: Option<(String, String)>,
pub page: usize,
pub page_size: usize,
}Expand description
A single-entity search query. Client sends this; server returns
SearchResult. Intentionally small — filter parsing lives on top
of FilterExpr, not as free-form JSON.
Fields§
§query: StringFree-text match across the declared text fields.
filters: HashMap<String, Value>Filter expression: { field: value } = equality. Combined with
match using AND. Range + IN + boolean ops live on FilterExpr.
facets: Vec<String>Facets to compute counts for. If empty, use all declared facets.
sort: Option<(String, String)>Sort spec: (field, "asc" | "desc"). Must be in the entity’s
sortable list.
page: usizeZero-indexed page.
page_size: usizePage size. Default 20, hard-cap at 100 to keep result payloads predictable for subscriptions.
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