Class: Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponseQueryExpansionInfo

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

Information describing query expansion including whether expansion has occurred.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2SearchResponseQueryExpansionInfo

Returns a new instance of GoogleCloudRetailV2SearchResponseQueryExpansionInfo.



3178
3179
3180
# File 'lib/google/apis/retail_v2/classes.rb', line 3178

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

Instance Attribute Details

#expanded_queryBoolean Also known as: expanded_query?

Bool describing whether query expansion has occurred. Corresponds to the JSON property expandedQuery

Returns:

  • (Boolean)


3169
3170
3171
# File 'lib/google/apis/retail_v2/classes.rb', line 3169

def expanded_query
  @expanded_query
end

#pinned_result_countFixnum

Number of pinned results. This field will only be set when expansion happens and SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true. Corresponds to the JSON property pinnedResultCount

Returns:

  • (Fixnum)


3176
3177
3178
# File 'lib/google/apis/retail_v2/classes.rb', line 3176

def pinned_result_count
  @pinned_result_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3183
3184
3185
3186
# File 'lib/google/apis/retail_v2/classes.rb', line 3183

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