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
Namespace
Google \ Cloud \ Retail \ V2 \ RuleMethods
__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.
setQueryTerms
Terms from the search query.
Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.
var
string[]
$this
getSynonyms
Defines a set of synonyms.
Cannot contain duplicates. Can specify up to 100 synonyms.
setSynonyms
Defines a set of synonyms.
Cannot contain duplicates. Can specify up to 100 synonyms.
var
string[]
$this
getOnewayTerms
Will be [deprecated = true] post migration;
setOnewayTerms
Will be [deprecated = true] post migration;
var
string[]
$this