Class: Google::Apis::RetailV2::GoogleCloudRetailV2RuleOnewaySynonymsAction
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2::GoogleCloudRetailV2RuleOnewaySynonymsAction
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/retail_v2/classes.rb,
lib/google/apis/retail_v2/representations.rb,
lib/google/apis/retail_v2/representations.rb
Overview
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".
Instance Attribute Summary collapse
-
#oneway_terms ⇒ Array<String>
Will be [deprecated = true] post migration; Corresponds to the JSON property
onewayTerms
. -
#query_terms ⇒ Array<String>
Terms from the search query.
-
#synonyms ⇒ Array<String>
Defines a set of synonyms.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2RuleOnewaySynonymsAction
constructor
A new instance of GoogleCloudRetailV2RuleOnewaySynonymsAction.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2RuleOnewaySynonymsAction
Returns a new instance of GoogleCloudRetailV2RuleOnewaySynonymsAction.
4643 4644 4645 |
# File 'lib/google/apis/retail_v2/classes.rb', line 4643 def initialize(**args) update!(**args) end |
Instance Attribute Details
#oneway_terms ⇒ Array<String>
Will be [deprecated = true] post migration;
Corresponds to the JSON property onewayTerms
4629 4630 4631 |
# File 'lib/google/apis/retail_v2/classes.rb', line 4629 def oneway_terms @oneway_terms end |
#query_terms ⇒ Array<String>
Terms from the search query. Will treat synonyms as their synonyms. Not
themselves synonyms of the synonyms. Can specify up to 100 terms.
Corresponds to the JSON property queryTerms
4635 4636 4637 |
# File 'lib/google/apis/retail_v2/classes.rb', line 4635 def query_terms @query_terms end |
#synonyms ⇒ Array<String>
Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100
synonyms.
Corresponds to the JSON property synonyms
4641 4642 4643 |
# File 'lib/google/apis/retail_v2/classes.rb', line 4641 def synonyms @synonyms end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4648 4649 4650 4651 4652 |
# File 'lib/google/apis/retail_v2/classes.rb', line 4648 def update!(**args) @oneway_terms = args[:oneway_terms] if args.key?(:oneway_terms) @query_terms = args[:query_terms] if args.key?(:query_terms) @synonyms = args[:synonyms] if args.key?(:synonyms) end |