Struct google_api_proto::google::cloud::talent::v4::search_jobs_request::CustomRankingInfo
source · pub struct CustomRankingInfo {
pub importance_level: i32,
pub ranking_expression: String,
}
Expand description
Custom ranking information for [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
Fields§
§importance_level: i32
Required. Controls over how important the score of [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] gets applied to job’s final ranking position.
An error is thrown if not specified.
ranking_expression: String
Required. Controls over how job documents get ranked on top of existing relevance score (determined by API algorithm). A combination of the ranking expression and relevance score is used to determine job’s final ranking position.
The syntax for this expression is a subset of Google SQL syntax.
Supported operators are: +, -, *, /, where the left and right side of the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] key, integer/double value or an expression that can be evaluated to a number.
Parenthesis are supported to adjust calculation precedence. The expression must be < 200 characters in length.
The expression is considered invalid for a job if the expression references custom attributes that are not populated on the job or if the expression results in a divide by zero. If an expression is invalid for a job, that job is demoted to the end of the results.
Sample ranking expression (year + 25) * 0.25 - (freshness / 0.5)
Implementations§
source§impl CustomRankingInfo
impl CustomRankingInfo
sourcepub fn importance_level(&self) -> ImportanceLevel
pub fn importance_level(&self) -> ImportanceLevel
Returns the enum value of importance_level
, or the default if the field is set to an invalid enum value.
sourcepub fn set_importance_level(&mut self, value: ImportanceLevel)
pub fn set_importance_level(&mut self, value: ImportanceLevel)
Sets importance_level
to the provided enum value.
Trait Implementations§
source§impl Clone for CustomRankingInfo
impl Clone for CustomRankingInfo
source§fn clone(&self) -> CustomRankingInfo
fn clone(&self) -> CustomRankingInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CustomRankingInfo
impl Debug for CustomRankingInfo
source§impl Default for CustomRankingInfo
impl Default for CustomRankingInfo
source§impl Message for CustomRankingInfo
impl Message for CustomRankingInfo
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 CustomRankingInfo
impl PartialEq for CustomRankingInfo
source§fn eq(&self, other: &CustomRankingInfo) -> bool
fn eq(&self, other: &CustomRankingInfo) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CustomRankingInfo
Auto Trait Implementations§
impl Freeze for CustomRankingInfo
impl RefUnwindSafe for CustomRankingInfo
impl Send for CustomRankingInfo
impl Sync for CustomRankingInfo
impl Unpin for CustomRankingInfo
impl UnwindSafe for CustomRankingInfo
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