Class: Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequestSpellCorrectionSpec

Inherits:
Object
  • Object
show all
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

The specification for query spell correction.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2SearchRequestSpellCorrectionSpec

Returns a new instance of GoogleCloudRetailV2SearchRequestSpellCorrectionSpec.



5017
5018
5019
# File 'lib/google/apis/retail_v2/classes.rb', line 5017

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

Instance Attribute Details

#modeString

The mode under which spell correction should take effect to replace the original search query. Default to Mode.AUTO. Corresponds to the JSON property mode

Returns:

  • (String)


5015
5016
5017
# File 'lib/google/apis/retail_v2/classes.rb', line 5015

def mode
  @mode
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5022
5023
5024
# File 'lib/google/apis/retail_v2/classes.rb', line 5022

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