Class: Google::Apis::CloudsearchV1::SourceCrowdingConfig
- Inherits:
-
Object
- Object
- Google::Apis::CloudsearchV1::SourceCrowdingConfig
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudsearch_v1/classes.rb,
lib/google/apis/cloudsearch_v1/representations.rb,
lib/google/apis/cloudsearch_v1/representations.rb
Overview
Set search results crowding limits. Crowding is a situation in which multiple results from the same source or host "crowd out" other results, diminishing the quality of search for users. To foster better search quality and source diversity in search results, you can set a condition to reduce repetitive results by source.
Instance Attribute Summary collapse
-
#num_results ⇒ Fixnum
Maximum number of results allowed from a datasource in a result page as long as results from other sources are not exhausted.
-
#num_suggestions ⇒ Fixnum
Maximum number of suggestions allowed from a source.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SourceCrowdingConfig
constructor
A new instance of SourceCrowdingConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SourceCrowdingConfig
Returns a new instance of SourceCrowdingConfig.
7601 7602 7603 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 7601 def initialize(**args) update!(**args) end |
Instance Attribute Details
#num_results ⇒ Fixnum
Maximum number of results allowed from a datasource in a result page as long
as results from other sources are not exhausted. Value specified must not be
negative. A default value is used if this value is equal to 0. To disable
crowding, set the value greater than 100.
Corresponds to the JSON property numResults
7593 7594 7595 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 7593 def num_results @num_results end |
#num_suggestions ⇒ Fixnum
Maximum number of suggestions allowed from a source. No limits will be set on
results if this value is less than or equal to 0.
Corresponds to the JSON property numSuggestions
7599 7600 7601 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 7599 def num_suggestions @num_suggestions end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7606 7607 7608 7609 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 7606 def update!(**args) @num_results = args[:num_results] if args.key?(:num_results) @num_suggestions = args[:num_suggestions] if args.key?(:num_suggestions) end |