Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo

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

Overview

Information describing query expansion including whether expansion has occurred.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo

Returns a new instance of GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo.



4379
4380
4381
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4379

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)


4370
4371
4372
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4370

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)


4377
4378
4379
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4377

def pinned_result_count
  @pinned_result_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4384
4385
4386
4387
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4384

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