pub struct SearchParams {
pub q: Option<String>,
pub sort: Option<String>,
pub per_page: Option<i32>,
pub org_slug: Option<String>,
pub org_type: Option<String>,
pub keyword: Vec<String>,
pub spatial_filter: Option<String>,
pub spatial_geometry: Option<Value>,
pub spatial_within: Option<bool>,
pub after: Option<String>,
pub slug: Option<String>,
}Expand description
Parameters for CatalogClient::search.
Constructed with a builder: start from SearchParams::new and chain
setters. All fields are optional; the server defaults apply when a field
is left unset.
Fields§
§q: Option<String>Full-text query.
sort: Option<String>Sort order (relevance, popularity, distance, last_harvested_date).
per_page: Option<i32>Results per page.
org_slug: Option<String>Filter by organization slug (e.g. nasa).
org_type: Option<String>Filter by organization type (e.g. Federal Government).
keyword: Vec<String>Exact-match keyword filters. Repeated on the wire.
spatial_filter: Option<String>geospatial or non-geospatial.
spatial_geometry: Option<Value>GeoJSON geometry used for bounding-box / shape queries.
spatial_within: Option<bool>Whether to require containment (true) vs. intersection (false).
after: Option<String>Opaque cursor from a previous SearchResponse::after.
slug: Option<String>Exact-match slug filter (single dataset lookup).
Implementations§
Source§impl SearchParams
impl SearchParams
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct empty SearchParams.
Sourcepub fn keyword(self, keyword: impl Into<String>) -> Self
pub fn keyword(self, keyword: impl Into<String>) -> Self
Append a keyword filter (exact match).
Sourcepub fn spatial_filter(self, mode: impl Into<String>) -> Self
pub fn spatial_filter(self, mode: impl Into<String>) -> Self
Set the spatial-filter mode.
Sourcepub fn spatial_geometry(self, geometry: Value) -> Self
pub fn spatial_geometry(self, geometry: Value) -> Self
Set the GeoJSON geometry for spatial queries.
Sourcepub fn spatial_within(self, within: bool) -> Self
pub fn spatial_within(self, within: bool) -> Self
Require containment vs. intersection for spatial matches.
Trait Implementations§
Source§impl Clone for SearchParams
impl Clone for SearchParams
Source§fn clone(&self) -> SearchParams
fn clone(&self) -> SearchParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more