Google Cloud Retail V2 Client - Class FacetValue (1.4.2)

Reference documentation and code samples for the Google Cloud Retail V2 Client class FacetValue.

A facet value which contains value names and their count.

Generated from protobuf message google.cloud.retail.v2.SearchResponse.Facet.FacetValue

Namespace

Google \ Cloud \ Retail \ V2 \ SearchResponse \ Facet

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ value
string

Text value of a facet, such as "Black" for facet "colorFamilies".

↳ interval
Google\Cloud\Retail\V2\Interval

Interval value for a facet, such as 10, 20) for facet "price".

↳ count
int|string

Number of items that have this facet value.

↳ min_value
float

The minimum value in the [FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.

↳ max_value
float

The maximum value in the FacetValue.interval . Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.

getValue

Text value of a facet, such as "Black" for facet "colorFamilies".

Returns
Type
Description
string

hasValue

setValue

Text value of a facet, such as "Black" for facet "colorFamilies".

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getInterval

Interval value for a facet, such as [10, 20) for facet "price".

Returns
Type
Description

hasInterval

setInterval

Interval value for a facet, such as [10, 20) for facet "price".

Parameter
Name
Description
Returns
Type
Description
$this

getCount

Number of items that have this facet value.

Returns
Type
Description
int|string

setCount

Number of items that have this facet value.

Parameter
Name
Description
var
int|string
Returns
Type
Description
$this

getMinValue

The minimum value in the FacetValue.interval .

Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.

Returns
Type
Description
float

setMinValue

The minimum value in the FacetValue.interval .

Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.

Parameter
Name
Description
var
float
Returns
Type
Description
$this

getMaxValue

The maximum value in the FacetValue.interval .

Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.

Returns
Type
Description
float

setMaxValue

The maximum value in the FacetValue.interval .

Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.

Parameter
Name
Description
var
float
Returns
Type
Description
$this

getFacetValue

Returns
Type
Description
string
Design a Mobile Site
View Site in Mobile | Classic
Share by: