Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCatalogAttributeFacetConfigRerankConfig
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCatalogAttributeFacetConfigRerankConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/retail_v2beta/classes.rb,
lib/google/apis/retail_v2beta/representations.rb,
lib/google/apis/retail_v2beta/representations.rb
Overview
Options to rerank based on facet values engaged by the user for the current key. That key needs to be a custom textual key and facetable. To use this control, you also need to pass all the facet keys engaged by the user in the request using the field [SearchRequest.FacetSpec]. In particular, if you don't pass the facet keys engaged that you want to rerank on, this control won't be effective. Moreover, to obtain better results, the facet values that you want to rerank on should be close to English (ideally made of words, underscores, and spaces).
Instance Attribute Summary collapse
-
#facet_values ⇒ Array<String>
If empty, rerank on all facet values for the current key.
-
#rerank_facet ⇒ Boolean
(also: #rerank_facet?)
If set to true, then we also rerank the dynamic facets based on the facet values engaged by the user for the current attribute key during serving.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2betaCatalogAttributeFacetConfigRerankConfig
constructor
A new instance of GoogleCloudRetailV2betaCatalogAttributeFacetConfigRerankConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2betaCatalogAttributeFacetConfigRerankConfig
Returns a new instance of GoogleCloudRetailV2betaCatalogAttributeFacetConfigRerankConfig.
3317 3318 3319 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3317 def initialize(**args) update!(**args) end |
Instance Attribute Details
#facet_values ⇒ Array<String>
If empty, rerank on all facet values for the current key. Otherwise, will
rerank on the facet values from this list only.
Corresponds to the JSON property facetValues
3308 3309 3310 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3308 def facet_values @facet_values end |
#rerank_facet ⇒ Boolean Also known as: rerank_facet?
If set to true, then we also rerank the dynamic facets based on the facet
values engaged by the user for the current attribute key during serving.
Corresponds to the JSON property rerankFacet
3314 3315 3316 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3314 def rerank_facet @rerank_facet end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3322 3323 3324 3325 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3322 def update!(**args) @facet_values = args[:facet_values] if args.key?(:facet_values) @rerank_facet = args[:rerank_facet] if args.key?(:rerank_facet) end |