Struct google_api_proto::google::cloud::retail::v2alpha::rule::BoostAction
source · pub struct BoostAction {
pub boost: f32,
pub products_filter: String,
}
Expand description
A boost action to apply to results matching condition specified above.
Fields§
§boost: f32
Strength of the condition boost, which must be in [-1, 1]. Negative boost means demotion. Default is 0.0.
Setting to 1.0 gives the item a big promotion. However, it does not necessarily mean that the boosted item will be the top result at all times, nor that other items will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant items.
Setting to -1.0 gives the item a big demotion. However, results that are deeply relevant might still be shown. The item will have an upstream battle to get a fairly high ranking, but it is not blocked out completely.
Setting to 0.0 means no boost applied. The boosting condition is ignored.
products_filter: String
The filter can have a max size of 5000 characters. An expression which specifies which products to apply an action to. The syntax and supported fields are the same as a filter expression. See [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] for detail syntax and limitations.
Examples:
- To boost products with product ID “product_1” or “product_2”, and
color
“Red” or “Blue”:
(id: ANY(“product_1”, “product_2”))
AND
(colorFamilies: ANY(“Red”, “Blue”))
Trait Implementations§
source§impl Clone for BoostAction
impl Clone for BoostAction
source§fn clone(&self) -> BoostAction
fn clone(&self) -> BoostAction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BoostAction
impl Debug for BoostAction
source§impl Default for BoostAction
impl Default for BoostAction
source§impl Message for BoostAction
impl Message for BoostAction
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for BoostAction
impl PartialEq for BoostAction
source§fn eq(&self, other: &BoostAction) -> bool
fn eq(&self, other: &BoostAction) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for BoostAction
Auto Trait Implementations§
impl Freeze for BoostAction
impl RefUnwindSafe for BoostAction
impl Send for BoostAction
impl Sync for BoostAction
impl Unpin for BoostAction
impl UnwindSafe for BoostAction
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request