Google Cloud Discovery Engine V1 Client - Class QueryExpansionSpec (0.7.1)

Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class QueryExpansionSpec.

Specification to determine under which conditions query expansion should occur.

Generated from protobuf message google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec

Namespace

Google \ Cloud \ DiscoveryEngine \ V1 \ SearchRequest

Methods

__construct

Constructor.

Parameters
NameDescription
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.

Returns
TypeDescription
int

setCondition

The condition under which query expansion should occur. Default to Condition.DISABLED.

Parameter
NameDescription
var int
Returns
TypeDescription
$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.

Returns
TypeDescription
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.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this