Google Cloud Retail V2 Client - Class ReplacementAction (1.0.1)

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

Replaces a term in the query. Multiple replacement candidates can be specified. All query_terms will be replaced with the replacement term.

Example: Replace "gShoe" with "google shoe".

Generated from protobuf message google.cloud.retail.v2.Rule.ReplacementAction

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ query_terms array

Terms from the search query. Will be replaced by replacement term. Can specify up to 100 terms.

↳ replacement_term string

Term that will be used for replacement.

↳ term string

Will be [deprecated = true] post migration;

getQueryTerms

Terms from the search query.

Will be replaced by replacement term. Can specify up to 100 terms.

Generated from protobuf field repeated string query_terms = 2;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setQueryTerms

Terms from the search query.

Will be replaced by replacement term. Can specify up to 100 terms.

Generated from protobuf field repeated string query_terms = 2;

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getReplacementTerm

Term that will be used for replacement.

Generated from protobuf field string replacement_term = 3;

Returns
TypeDescription
string

setReplacementTerm

Term that will be used for replacement.

Generated from protobuf field string replacement_term = 3;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getTerm

Will be [deprecated = true] post migration;

Generated from protobuf field string term = 1;

Returns
TypeDescription
string

setTerm

Will be [deprecated = true] post migration;

Generated from protobuf field string term = 1;

Parameter
NameDescription
var string
Returns
TypeDescription
$this