Class: Google::Apis::CloudsearchV1::SourceCrowdingConfig
- Inherits:
-
Object
- Object
- Google::Apis::CloudsearchV1::SourceCrowdingConfig
- 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
-
#field ⇒ String
Use a field to control results crowding.
-
#num_results ⇒ Fixnum
Maximum number of results allowed from a source.
-
#num_suggestions ⇒ Fixnum
Maximum number of suggestions allowed from a source.
-
#source ⇒ Boolean
(also: #source?)
Control results by content source.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SourceCrowdingConfig
constructor
A new instance of SourceCrowdingConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ SourceCrowdingConfig
Returns a new instance of SourceCrowdingConfig
4039 4040 4041 |
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4039 def initialize(**args) update!(**args) end |
Instance Attribute Details
#field ⇒ String
Use a field to control results crowding. For example, if you want to
control overly similar results from Gmail topics, use thread_id
.
For similar pages from Google Sites, you can use webspace_id
.
When matching query results contain the same field value in
GenericMetadata
, crowding limits are set on those records.
Corresponds to the JSON property field
4018 4019 4020 |
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4018 def field @field end |
#num_results ⇒ Fixnum
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
4024 4025 4026 |
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4024 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
4030 4031 4032 |
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4030 def num_suggestions @num_suggestions end |
#source ⇒ Boolean Also known as: source?
Control results by content source. This option limits the total number
of results from a given source and ignores field-based crowding control.
Corresponds to the JSON property source
4036 4037 4038 |
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4036 def source @source end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4044 4045 4046 4047 4048 4049 |
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 4044 def update!(**args) @field = args[:field] if args.key?(:field) @num_results = args[:num_results] if args.key?(:num_results) @num_suggestions = args[:num_suggestions] if args.key?(:num_suggestions) @source = args[:source] if args.key?(:source) end |