Class: Google::Apis::CloudsearchV1::SourceConfig

Inherits:
Object
  • Object
show all
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

Configurations for a source while processing a Search or Suggest request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SourceConfig

Returns a new instance of SourceConfig.



4810
4811
4812
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 4810

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

Instance Attribute Details

#crowding_configGoogle::Apis::CloudsearchV1::SourceCrowdingConfig

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. Corresponds to the JSON property crowdingConfig



4797
4798
4799
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 4797

def crowding_config
  @crowding_config
end

#scoring_configGoogle::Apis::CloudsearchV1::SourceScoringConfig

Set the scoring configuration. This allows modifying the ranking of results for a source. Corresponds to the JSON property scoringConfig



4803
4804
4805
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 4803

def scoring_config
  @scoring_config
end

#sourceGoogle::Apis::CloudsearchV1::Source

Defines sources for the suggest/search APIs. Corresponds to the JSON property source



4808
4809
4810
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 4808

def source
  @source
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4815
4816
4817
4818
4819
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 4815

def update!(**args)
  @crowding_config = args[:crowding_config] if args.key?(:crowding_config)
  @scoring_config = args[:scoring_config] if args.key?(:scoring_config)
  @source = args[:source] if args.key?(:source)
end