Struct google_api_proto::google::cloud::discoveryengine::v1beta::search_request::boost_spec::condition_boost_spec::BoostControlSpec
source · pub struct BoostControlSpec {
pub field_name: String,
pub attribute_type: i32,
pub interpolation_type: i32,
pub control_points: Vec<ControlPoint>,
}
Expand description
Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above.
Fields§
§field_name: String
The name of the field whose value will be used to determine the boost amount.
attribute_type: i32
The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
interpolation_type: i32
The interpolation type to be applied to connect the control points listed below.
control_points: Vec<ControlPoint>
The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
Implementations§
source§impl BoostControlSpec
impl BoostControlSpec
sourcepub fn attribute_type(&self) -> AttributeType
pub fn attribute_type(&self) -> AttributeType
Returns the enum value of attribute_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_attribute_type(&mut self, value: AttributeType)
pub fn set_attribute_type(&mut self, value: AttributeType)
Sets attribute_type
to the provided enum value.
sourcepub fn interpolation_type(&self) -> InterpolationType
pub fn interpolation_type(&self) -> InterpolationType
Returns the enum value of interpolation_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_interpolation_type(&mut self, value: InterpolationType)
pub fn set_interpolation_type(&mut self, value: InterpolationType)
Sets interpolation_type
to the provided enum value.
Trait Implementations§
source§impl Clone for BoostControlSpec
impl Clone for BoostControlSpec
source§fn clone(&self) -> BoostControlSpec
fn clone(&self) -> BoostControlSpec
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BoostControlSpec
impl Debug for BoostControlSpec
source§impl Default for BoostControlSpec
impl Default for BoostControlSpec
source§impl Message for BoostControlSpec
impl Message for BoostControlSpec
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
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<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
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<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
.source§impl PartialEq for BoostControlSpec
impl PartialEq for BoostControlSpec
source§fn eq(&self, other: &BoostControlSpec) -> bool
fn eq(&self, other: &BoostControlSpec) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for BoostControlSpec
Auto Trait Implementations§
impl Freeze for BoostControlSpec
impl RefUnwindSafe for BoostControlSpec
impl Send for BoostControlSpec
impl Sync for BoostControlSpec
impl Unpin for BoostControlSpec
impl UnwindSafe for BoostControlSpec
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