Class: Google::Cloud::Retail::V2::SearchRequest::BoostSpec
- Inherits:
-
Object
- Object
- Google::Cloud::Retail::V2::SearchRequest::BoostSpec
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/retail/v2/search_service.rb
Overview
Boost specification to boost certain items.
Defined Under Namespace
Classes: ConditionBoostSpec
Instance Attribute Summary collapse
-
#condition_boost_specs ⇒ ::Array<::Google::Cloud::Retail::V2::SearchRequest::BoostSpec::ConditionBoostSpec>
Condition boost specifications.
-
#skip_boost_spec_validation ⇒ ::Boolean
Whether to skip boostspec validation.
Instance Attribute Details
#condition_boost_specs ⇒ ::Array<::Google::Cloud::Retail::V2::SearchRequest::BoostSpec::ConditionBoostSpec>
Returns Condition boost specifications. If a product matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 566 class BoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Boost applies to products which match a condition. # @!attribute [rw] condition # @return [::String] # An expression which specifies a boost condition. The syntax and # supported fields are the same as a filter expression. See # {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter} for # detail syntax and limitations. # # Examples: # # * To boost products with product ID "product_1" or "product_2", and # color # "Red" or "Blue": # * (id: ANY("product_1", "product_2")) AND (colorFamilies: # ANY("Red","Blue")) # @!attribute [rw] boost # @return [::Float] # Strength of the condition boost, which should be in [-1, 1]. Negative # boost means demotion. Default is 0.0. # # Setting to 1.0 gives the item a big promotion. However, it does not # necessarily mean that the boosted item will be the top result at all # times, nor that other items will be excluded. Results could still be # shown even when none of them matches the condition. And results that # are significantly more relevant to the search query can still trump # your heavily favored but irrelevant items. # # Setting to -1.0 gives the item a big demotion. However, results that # are deeply relevant might still be shown. The item will have an # upstream battle to get a fairly high ranking, but it is not blocked out # completely. # # Setting to 0.0 means no boost applied. The boosting condition is # ignored. class ConditionBoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#skip_boost_spec_validation ⇒ ::Boolean
Returns Whether to skip boostspec validation. If this field is set to true, invalid BoostSpec.condition_boost_specs will be ignored and valid BoostSpec.condition_boost_specs will still be applied.
566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 566 class BoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Boost applies to products which match a condition. # @!attribute [rw] condition # @return [::String] # An expression which specifies a boost condition. The syntax and # supported fields are the same as a filter expression. See # {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter} for # detail syntax and limitations. # # Examples: # # * To boost products with product ID "product_1" or "product_2", and # color # "Red" or "Blue": # * (id: ANY("product_1", "product_2")) AND (colorFamilies: # ANY("Red","Blue")) # @!attribute [rw] boost # @return [::Float] # Strength of the condition boost, which should be in [-1, 1]. Negative # boost means demotion. Default is 0.0. # # Setting to 1.0 gives the item a big promotion. However, it does not # necessarily mean that the boosted item will be the top result at all # times, nor that other items will be excluded. Results could still be # shown even when none of them matches the condition. And results that # are significantly more relevant to the search query can still trump # your heavily favored but irrelevant items. # # Setting to -1.0 gives the item a big demotion. However, results that # are deeply relevant might still be shown. The item will have an # upstream battle to get a fairly high ranking, but it is not blocked out # completely. # # Setting to 0.0 means no boost applied. The boosting condition is # ignored. class ConditionBoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |