Reference documentation and code samples for the Google Cloud Retail V2 Client class TwowaySynonymsAction.
Creates a set of terms that will be treated as synonyms of each other.
Example: synonyms of "sneakers" and "shoes".
- "sneakers" will use a synonym of "shoes".
- "shoes" will use a synonym of "sneakers".
Generated from protobuf message google.cloud.retail.v2.Rule.TwowaySynonymsAction
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ synonyms |
array
Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. |
getSynonyms
Defines a set of synonyms.
Can specify up to 100 synonyms. Must specify at least 2 synonyms.
Generated from protobuf field repeated string synonyms = 1;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setSynonyms
Defines a set of synonyms.
Can specify up to 100 synonyms. Must specify at least 2 synonyms.
Generated from protobuf field repeated string synonyms = 1;
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |