Reference documentation and code samples for the Google Cloud Retail V2 Client class OnewaySynonymsAction.
Maps a set of terms to a set of synonyms.
Set of synonyms will be treated as synonyms of each query term only. query_terms
will not be treated as synonyms of each other.
Example: "sneakers" will use a synonym of "shoes".
"shoes" will not use a synonym of "sneakers".
Generated from protobuf message google.cloud.retail.v2.Rule.OnewaySynonymsAction
Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ query_terms
array
Terms from the search query. Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.
↳ synonyms
array
Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100 synonyms.
↳ oneway_terms
array
Will be [deprecated = true] post migration;
getQueryTerms
Terms from the search query.
Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.
Generated from protobuf field repeated string query_terms = 3;
Google\Protobuf\Internal\RepeatedField
setQueryTerms
Terms from the search query.
Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.
Generated from protobuf field repeated string query_terms = 3;
var
string[]
$this
getSynonyms
Defines a set of synonyms.
Cannot contain duplicates. Can specify up to 100 synonyms.
Generated from protobuf field repeated string synonyms = 4;
Google\Protobuf\Internal\RepeatedField
setSynonyms
Defines a set of synonyms.
Cannot contain duplicates. Can specify up to 100 synonyms.
Generated from protobuf field repeated string synonyms = 4;
var
string[]
$this
getOnewayTerms
Will be [deprecated = true] post migration;
Generated from protobuf field repeated string oneway_terms = 2;
Google\Protobuf\Internal\RepeatedField
setOnewayTerms
Will be [deprecated = true] post migration;
Generated from protobuf field repeated string oneway_terms = 2;
var
string[]
$this