Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestQueryExpansionSpec

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/retail_v2alpha/classes.rb,
lib/google/apis/retail_v2alpha/representations.rb,
lib/google/apis/retail_v2alpha/representations.rb

Overview

Specification to determine under which conditions query expansion should occur.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaSearchRequestQueryExpansionSpec

Returns a new instance of GoogleCloudRetailV2alphaSearchRequestQueryExpansionSpec.



8245
8246
8247
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 8245

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#conditionString

The condition under which query expansion should occur. Default to Condition. DISABLED. Corresponds to the JSON property condition

Returns:

  • (String)


8235
8236
8237
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 8235

def condition
  @condition
end

#pin_unexpanded_resultsBoolean Also known as: pin_unexpanded_results?

Whether to pin unexpanded results. The default value is false. If this field is set to true, unexpanded products are always at the top of the search results, followed by the expanded results. Corresponds to the JSON property pinUnexpandedResults

Returns:

  • (Boolean)


8242
8243
8244
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 8242

def pin_unexpanded_results
  @pin_unexpanded_results
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8250
8251
8252
8253
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 8250

def update!(**args)
  @condition = args[:condition] if args.key?(:condition)
  @pin_unexpanded_results = args[:pin_unexpanded_results] if args.key?(:pin_unexpanded_results)
end