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 specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 662 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.
662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 662 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 |