Reference documentation and code samples for the Google Cloud Retail V2 Client class QueryExpansionSpec.
Specification to determine under which conditions query expansion should occur.
Generated from protobuf message google.cloud.retail.v2.SearchRequest.QueryExpansionSpec
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ condition |
int
The condition under which query expansion should occur. Default to Condition.DISABLED. |
↳ pin_unexpanded_results |
bool
Whether to pin unexpanded results. If this field is set to true, unexpanded products are always at the top of the search results, followed by the expanded results. |
getCondition
The condition under which query expansion should occur. Default to Condition.DISABLED.
Generated from protobuf field .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition condition = 1;
Returns | |
---|---|
Type | Description |
int |
setCondition
The condition under which query expansion should occur. Default to Condition.DISABLED.
Generated from protobuf field .google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition condition = 1;
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getPinUnexpandedResults
Whether to pin unexpanded results. If this field is set to true, unexpanded products are always at the top of the search results, followed by the expanded results.
Generated from protobuf field bool pin_unexpanded_results = 2;
Returns | |
---|---|
Type | Description |
bool |
setPinUnexpandedResults
Whether to pin unexpanded results. If this field is set to true, unexpanded products are always at the top of the search results, followed by the expanded results.
Generated from protobuf field bool pin_unexpanded_results = 2;
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |