Struct google_api_proto::google::cloud::visionai::v1alpha1::FacetProperty
source · pub struct FacetProperty {
pub mapped_fields: Vec<String>,
pub display_name: String,
pub result_size: i64,
pub bucket_type: i32,
pub range_facet_config: Option<RangeFacetConfig>,
}
Expand description
Central configuration for a facet.
Fields§
§mapped_fields: Vec<String>
Name of the facets, which are the dimensions users want to use to refine
search results. mapped_fields
will match UserSpecifiedDataSchema keys.
For example, user can add a bunch of UGAs with the same key, such as player:adam, player:bob, player:charles. When multiple mapped_fields are specified, will merge their value together as final facet value. E.g. home_team: a, home_team:b, away_team:a, away_team:c, when facet_field = [home_team, away_team], facet_value will be [a, b, c].
UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the mapped_field equals the parent SearchConfig.name, the parent must also contain a SearchCriteriaProperty that maps to the same fields. mapped_fields must not be empty.
display_name: String
Display name of the facet. To be used by UI for facet rendering.
result_size: i64
Maximum number of unique bucket to return for one facet. Bucket number can be large for high-cardinality facet such as “player”. We only return top-n most related ones to user. If it’s <= 0, the server will decide the appropriate result_size.
bucket_type: i32
Facet bucket type e.g. value, range.
range_facet_config: Option<RangeFacetConfig>
Implementations§
source§impl FacetProperty
impl FacetProperty
sourcepub fn bucket_type(&self) -> FacetBucketType
pub fn bucket_type(&self) -> FacetBucketType
Returns the enum value of bucket_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_bucket_type(&mut self, value: FacetBucketType)
pub fn set_bucket_type(&mut self, value: FacetBucketType)
Sets bucket_type
to the provided enum value.
Trait Implementations§
source§impl Clone for FacetProperty
impl Clone for FacetProperty
source§fn clone(&self) -> FacetProperty
fn clone(&self) -> FacetProperty
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FacetProperty
impl Debug for FacetProperty
source§impl Default for FacetProperty
impl Default for FacetProperty
source§impl Message for FacetProperty
impl Message for FacetProperty
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 FacetProperty
impl PartialEq for FacetProperty
source§fn eq(&self, other: &FacetProperty) -> bool
fn eq(&self, other: &FacetProperty) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for FacetProperty
Auto Trait Implementations§
impl Freeze for FacetProperty
impl RefUnwindSafe for FacetProperty
impl Send for FacetProperty
impl Sync for FacetProperty
impl Unpin for FacetProperty
impl UnwindSafe for FacetProperty
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