Reference documentation and code samples for the Google Cloud Vision Ai V1 Client class FacetProperty.
Central configuration for a facet.
Generated from protobuf message google.cloud.visionai.v1.FacetProperty
Namespace
Google \ Cloud \ VisionAI \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ fixed_range_bucket_spec
↳ custom_range_bucket_spec
↳ datetime_bucket_spec
↳ mapped_fields
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
int|string
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
int
Facet bucket type e.g. value, range.
getFixedRangeBucketSpec
Fixed range facet bucket config.
hasFixedRangeBucketSpec
setFixedRangeBucketSpec
Fixed range facet bucket config.
$this
getCustomRangeBucketSpec
Custom range facet bucket config.
hasCustomRangeBucketSpec
setCustomRangeBucketSpec
Custom range facet bucket config.
$this
getDatetimeBucketSpec
Datetime range facet bucket config.
hasDatetimeBucketSpec
setDatetimeBucketSpec
Datetime range facet bucket config.
$this
getMappedFields
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.
setMappedFields
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.
var
string[]
$this
getDisplayName
Display name of the facet. To be used by UI for facet rendering.
string
setDisplayName
Display name of the facet. To be used by UI for facet rendering.
var
string
$this
getResultSize
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.
int|string
setResultSize
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.
var
int|string
$this
getBucketType
Facet bucket type e.g. value, range.
setBucketType
Facet bucket type e.g. value, range.
$this
getRangeFacetConfig
string

