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
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".
Generated from protobuf field string value = 1;
Returns | |
---|---|
Type | Description |
string |
hasValue
setValue
Text value of a facet, such as "Black" for facet "colorFamilies".
Generated from protobuf field string value = 1;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getInterval
Interval value for a facet, such as [10, 20) for facet "price".
Generated from protobuf field .google.cloud.retail.v2.Interval interval = 2;
Returns | |
---|---|
Type | Description |
Google\Cloud\Retail\V2\Interval|null |
hasInterval
setInterval
Interval value for a facet, such as [10, 20) for facet "price".
Generated from protobuf field .google.cloud.retail.v2.Interval interval = 2;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Retail\V2\Interval
|
Returns | |
---|---|
Type | Description |
$this |
getCount
Number of items that have this facet value.
Generated from protobuf field int64 count = 3;
Returns | |
---|---|
Type | Description |
int|string |
setCount
Number of items that have this facet value.
Generated from protobuf field int64 count = 3;
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.
Generated from protobuf field double min_value = 5;
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.
Generated from protobuf field double min_value = 5;
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.
Generated from protobuf field double max_value = 6;
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.
Generated from protobuf field double max_value = 6;
Parameter | |
---|---|
Name | Description |
var |
float
|
Returns | |
---|---|
Type | Description |
$this |
getFacetValue
Returns | |
---|---|
Type | Description |
string |