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.
616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 616 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.
616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 616 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 |