#[non_exhaustive]pub struct BoostSpec {
pub condition_boost_specs: Vec<ConditionBoostSpec>,
/* private fields */
}Available on crate features
assistant-service or conversational-search-service or search-service or serving-config-service only.Expand description
Boost specification to boost certain documents.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.condition_boost_specs: Vec<ConditionBoostSpec>Condition boost specifications. If a document matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
Implementations§
Source§impl BoostSpec
impl BoostSpec
pub fn new() -> Self
Sourcepub fn set_condition_boost_specs<T, V>(self, v: T) -> Self
pub fn set_condition_boost_specs<T, V>(self, v: T) -> Self
Sets the value of condition_boost_specs.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::search_request::boost_spec::ConditionBoostSpec;
let x = BoostSpec::new()
.set_condition_boost_specs([
ConditionBoostSpec::default()/* use setters */,
ConditionBoostSpec::default()/* use (different) setters */,
]);Trait Implementations§
impl StructuralPartialEq for BoostSpec
Auto Trait Implementations§
impl Freeze for BoostSpec
impl RefUnwindSafe for BoostSpec
impl Send for BoostSpec
impl Sync for BoostSpec
impl Unpin for BoostSpec
impl UnwindSafe for BoostSpec
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