Class: Google::Apis::CloudsearchV1::SourceCrowdingConfig

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudsearch_v1/classes.rb,
generated/google/apis/cloudsearch_v1/representations.rb,
generated/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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SourceCrowdingConfig

Returns a new instance of SourceCrowdingConfig.



4329
4330
4331
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4329

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

Instance Attribute Details

#num_resultsFixnum

Maximum number of results 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 numResults

Returns:

  • (Fixnum)


4321
4322
4323
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4321

def num_results
  @num_results
end

#num_suggestionsFixnum

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

Returns:

  • (Fixnum)


4327
4328
4329
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4327

def num_suggestions
  @num_suggestions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4334
4335
4336
4337
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4334

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