Struct google_api_proto::google::cloud::retail::v2alpha::catalog_attribute::FacetConfig
source · pub struct FacetConfig {
pub facet_intervals: Vec<Interval>,
pub ignored_facet_values: Vec<IgnoredFacetValues>,
pub merged_facet_values: Vec<MergedFacetValue>,
pub merged_facet: Option<MergedFacet>,
pub rerank_config: Option<RerankConfig>,
}
Expand description
Possible options for the facet that corresponds to the current attribute config.
Fields§
§facet_intervals: Vec<Interval>
If you don’t set the facet [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals] in the request to a numerical attribute, then we use the computed intervals with rounded bounds obtained from all its product numerical attribute values. The computed intervals might not be ideal for some attributes. Therefore, we give you the option to overwrite them with the facet_intervals field. The maximum of facet intervals per [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40. Each interval must have a lower bound or an upper bound. If both bounds are provided, then the lower bound must be smaller or equal than the upper bound.
ignored_facet_values: Vec<IgnoredFacetValues>
Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
merged_facet_values: Vec<MergedFacetValue>
Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if “dark_blue” merged into “BLUE”, then the latter can’t merge into “blues” because this would create a path of length 2. The maximum number of instances of MergedFacetValue per [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100. This feature is available only for textual custom attributes.
merged_facet: Option<MergedFacet>
Use this field only if you want to merge a facet key into another facet key.
rerank_config: Option<RerankConfig>
Set this field only if you want to rerank based on facet values engaged by the user for the current key. This option is only possible for custom facetable textual keys.
Trait Implementations§
source§impl Clone for FacetConfig
impl Clone for FacetConfig
source§fn clone(&self) -> FacetConfig
fn clone(&self) -> FacetConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FacetConfig
impl Debug for FacetConfig
source§impl Default for FacetConfig
impl Default for FacetConfig
source§impl Message for FacetConfig
impl Message for FacetConfig
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 FacetConfig
impl PartialEq for FacetConfig
source§fn eq(&self, other: &FacetConfig) -> bool
fn eq(&self, other: &FacetConfig) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for FacetConfig
Auto Trait Implementations§
impl Freeze for FacetConfig
impl RefUnwindSafe for FacetConfig
impl Send for FacetConfig
impl Sync for FacetConfig
impl Unpin for FacetConfig
impl UnwindSafe for FacetConfig
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