Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaSearchRequestCrowdingSpec
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaSearchRequestCrowdingSpec
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/discoveryengine_v1beta/classes.rb,
lib/google/apis/discoveryengine_v1beta/representations.rb,
lib/google/apis/discoveryengine_v1beta/representations.rb
Overview
Specification for crowding. Crowding improves the diversity of search results by limiting the number of results that share the same field value. For example, crowding on the color field with a max_count of 3 and mode DROP_CROWDED_RESULTS will return at most 3 results with the same color across all pages.
Instance Attribute Summary collapse
-
#field ⇒ String
The field to use for crowding.
-
#max_count ⇒ Fixnum
The maximum number of documents to keep per value of the field.
-
#mode ⇒ String
Mode to use for documents that are crowded away.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaSearchRequestCrowdingSpec
constructor
A new instance of GoogleCloudDiscoveryengineV1betaSearchRequestCrowdingSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaSearchRequestCrowdingSpec
Returns a new instance of GoogleCloudDiscoveryengineV1betaSearchRequestCrowdingSpec.
30355 30356 30357 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 30355 def initialize(**args) update!(**args) end |
Instance Attribute Details
#field ⇒ String
The field to use for crowding. Documents can be crowded by a field in the
Document object. Crowding field is case sensitive.
Corresponds to the JSON property field
30340 30341 30342 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 30340 def field @field end |
#max_count ⇒ Fixnum
The maximum number of documents to keep per value of the field. Once there are
at least max_count previous results which contain the same value for the given
field (according to the order specified in order_by), later results with the
same value are "crowded away". If not specified, the default value is 1.
Corresponds to the JSON property maxCount
30348 30349 30350 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 30348 def max_count @max_count end |
#mode ⇒ String
Mode to use for documents that are crowded away.
Corresponds to the JSON property mode
30353 30354 30355 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 30353 def mode @mode end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
30360 30361 30362 30363 30364 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 30360 def update!(**args) @field = args[:field] if args.key?(:field) @max_count = args[:max_count] if args.key?(:max_count) @mode = args[:mode] if args.key?(:mode) end |