pub struct SearchOverride {Show 13 fields
pub effective_from_ts: Option<i32>,
pub effective_to_ts: Option<i32>,
pub excludes: Option<Vec<SearchOverrideExclude>>,
pub filter_by: Option<String>,
pub filter_curated_hits: Option<bool>,
pub includes: Option<Vec<SearchOverrideInclude>>,
pub metadata: Option<Value>,
pub remove_matched_tokens: Option<bool>,
pub replace_query: Option<String>,
pub rule: Box<SearchOverrideRule>,
pub sort_by: Option<String>,
pub stop_processing: Option<bool>,
pub id: String,
}
Fields§
§effective_from_ts: Option<i32>
A Unix timestamp that indicates the date/time from which the override will be active. You can use this to create override rules that start applying from a future point in time.
effective_to_ts: Option<i32>
A Unix timestamp that indicates the date/time until which the override will be active. You can use this to create override rules that stop applying after a period of time.
excludes: Option<Vec<SearchOverrideExclude>>
List of document id
s that should be excluded from the search results.
filter_by: Option<String>
A filter by clause that is applied to any search query that matches the override rule.
filter_curated_hits: Option<bool>
When set to true, the filter conditions of the query is applied to the curated records as well. Default: false.
includes: Option<Vec<SearchOverrideInclude>>
List of document id
s that should be included in the search results
with their corresponding position
s.
metadata: Option<Value>
Return a custom JSON object in the Search API response, when this rule is triggered. This can can be used to display a pre-defined message (eg: a promotion banner) on the front-end when a particular rule is triggered.
remove_matched_tokens: Option<bool>
Indicates whether search query tokens that exist in the override’s rule should be removed from the search query.
replace_query: Option<String>
Replaces the current search query with this value, when the search query matches the override rule.
rule: Box<SearchOverrideRule>
§sort_by: Option<String>
A sort by clause that is applied to any search query that matches the override rule.
stop_processing: Option<bool>
When set to true, override processing will stop at the first matching rule. When set to false override processing will continue and multiple override actions will be triggered in sequence. Overrides are processed in the lexical sort order of their id field. Default: true.
id: String
Implementations§
Source§impl SearchOverride
impl SearchOverride
pub fn new(rule: SearchOverrideRule, id: String) -> SearchOverride
Trait Implementations§
Source§impl Clone for SearchOverride
impl Clone for SearchOverride
Source§fn clone(&self) -> SearchOverride
fn clone(&self) -> SearchOverride
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more