Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaServingConfig
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2beta::GoogleCloudRetailV2betaServingConfig
- 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
Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions).
Instance Attribute Summary collapse
-
#boost_control_ids ⇒ Array<String>
Condition boost specifications.
-
#display_name ⇒ String
Required.
-
#diversity_level ⇒ String
How much diversity to use in recommendation model results e.g.
-
#diversity_type ⇒ String
What kind of diversity to use - data driven or rule based.
-
#do_not_associate_control_ids ⇒ Array<String>
Condition do not associate specifications.
-
#dynamic_facet_spec ⇒ Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec
The specifications of dynamically generated facets.
-
#enable_category_filter_level ⇒ String
Whether to add additional category filters on the
similar-items
model. -
#facet_control_ids ⇒ Array<String>
Facet specifications for faceted search.
-
#filter_control_ids ⇒ Array<String>
Condition filter specifications.
-
#ignore_control_ids ⇒ Array<String>
Condition ignore specifications.
-
#ignore_recs_denylist ⇒ Boolean
(also: #ignore_recs_denylist?)
When the flag is enabled, the products in the denylist will not be filtered out in the recommendation filtering results.
-
#model_id ⇒ String
The id of the model in the same Catalog to use at serving time.
-
#name ⇒ String
Immutable.
-
#oneway_synonyms_control_ids ⇒ Array<String>
Condition oneway synonyms specifications.
-
#personalization_spec ⇒ Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequestPersonalizationSpec
The specification for personalization.
-
#price_reranking_level ⇒ String
How much price ranking we want in serving results.
-
#redirect_control_ids ⇒ Array<String>
Condition redirect specifications.
-
#replacement_control_ids ⇒ Array<String>
Condition replacement specifications.
-
#solution_types ⇒ Array<String>
Required.
-
#twoway_synonyms_control_ids ⇒ Array<String>
Condition synonyms specifications.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2betaServingConfig
constructor
A new instance of GoogleCloudRetailV2betaServingConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2betaServingConfig
Returns a new instance of GoogleCloudRetailV2betaServingConfig.
8634 8635 8636 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8634 def initialize(**args) update!(**args) end |
Instance Attribute Details
#boost_control_ids ⇒ Array<String>
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 100. Notice
that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are
set, the boost conditions from both places are evaluated. If a search request
matches multiple boost conditions, the final boost score is equal to the sum
of the boost scores from all matched boost conditions. Can only be set if
solution_types is SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property boostControlIds
8482 8483 8484 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8482 def boost_control_ids @boost_control_ids end |
#display_name ⇒ String
Required. The human readable serving config display name. Used in Retail UI.
This field must be a UTF-8 encoded string with a length limit of 128
characters. Otherwise, an INVALID_ARGUMENT error is returned.
Corresponds to the JSON property displayName
8489 8490 8491 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8489 def display_name @display_name end |
#diversity_level ⇒ String
How much diversity to use in recommendation model results e.g. medium-
diversity
or high-diversity
. Currently supported values: * no-diversity
*
low-diversity
* medium-diversity
* high-diversity
* auto-diversity
If
not specified, we choose default based on recommendation model type. Default
value: no-diversity
. Can only be set if solution_types is
SOLUTION_TYPE_RECOMMENDATION.
Corresponds to the JSON property diversityLevel
8499 8500 8501 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8499 def diversity_level @diversity_level end |
#diversity_type ⇒ String
What kind of diversity to use - data driven or rule based. If unset, the
server behavior defaults to RULE_BASED_DIVERSITY.
Corresponds to the JSON property diversityType
8505 8506 8507 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8505 def diversity_type @diversity_type end |
#do_not_associate_control_ids ⇒ Array<String>
Condition do not associate specifications. If multiple do not associate
conditions match, all matching do not associate controls in the list will
execute. - Order does not matter. - Maximum number of specifications is 100.
Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property doNotAssociateControlIds
8513 8514 8515 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8513 def do_not_associate_control_ids @do_not_associate_control_ids end |
#dynamic_facet_spec ⇒ Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec
The specifications of dynamically generated facets.
Corresponds to the JSON property dynamicFacetSpec
8518 8519 8520 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8518 def dynamic_facet_spec @dynamic_facet_spec end |
#enable_category_filter_level ⇒ String
Whether to add additional category filters on the similar-items
model. If
not specified, we enable it by default. Allowed values are: * no-category-
match
: No additional filtering of original results from the model and the
customer's filters. * relaxed-category-match
: Only keep results with
categories that match at least one item categories in the PredictRequests's
context item. * If customer also sends filters in the PredictRequest, then the
results will satisfy both conditions (user given and category match). Can only
be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.
Corresponds to the JSON property enableCategoryFilterLevel
8530 8531 8532 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8530 def enable_category_filter_level @enable_category_filter_level end |
#facet_control_ids ⇒ Array<String>
Facet specifications for faceted search. If empty, no facets are returned. The
ids refer to the ids of Control resources with only the Facet control set.
These controls are assumed to be in the same Catalog as the ServingConfig. A
maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is
returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property facetControlIds
8539 8540 8541 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8539 def facet_control_ids @facet_control_ids end |
#filter_control_ids ⇒ Array<String>
Condition filter specifications. If a product matches multiple conditions in
the specifications, filters from these specifications are all applied and
combined via the AND operator. Maximum number of specifications is 100. Can
only be set if solution_types is SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property filterControlIds
8547 8548 8549 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8547 def filter_control_ids @filter_control_ids end |
#ignore_control_ids ⇒ Array<String>
Condition ignore specifications. If multiple ignore conditions match, all
matching ignore controls in the list will execute. - Order does not matter. -
Maximum number of specifications is 100. Can only be set if solution_types is
SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property ignoreControlIds
8555 8556 8557 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8555 def ignore_control_ids @ignore_control_ids end |
#ignore_recs_denylist ⇒ Boolean Also known as: ignore_recs_denylist?
When the flag is enabled, the products in the denylist will not be filtered
out in the recommendation filtering results.
Corresponds to the JSON property ignoreRecsDenylist
8561 8562 8563 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8561 def ignore_recs_denylist @ignore_recs_denylist end |
#model_id ⇒ String
The id of the model in the same Catalog to use at serving time. Currently only
RecommendationModels are supported: https://cloud.google.com/retail/
recommendations-ai/docs/create-models Can be changed but only to a compatible
model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when
solution_types is SOLUTION_TYPE_RECOMMENDATION.
Corresponds to the JSON property modelId
8571 8572 8573 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8571 def model_id @model_id end |
#name ⇒ String
Immutable. Fully qualified name projects/*/locations/global/catalogs/*/
servingConfig/*
Corresponds to the JSON property name
8577 8578 8579 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8577 def name @name end |
#oneway_synonyms_control_ids ⇒ Array<String>
Condition oneway synonyms specifications. If multiple oneway synonyms
conditions match, all matching oneway synonyms controls in the list will
execute. Order of controls in the list will not matter. Maximum number of
specifications is 100. Can only be set if solution_types is
SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property onewaySynonymsControlIds
8586 8587 8588 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8586 def oneway_synonyms_control_ids @oneway_synonyms_control_ids end |
#personalization_spec ⇒ Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequestPersonalizationSpec
The specification for personalization.
Corresponds to the JSON property personalizationSpec
8591 8592 8593 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8591 def personalization_spec @personalization_spec end |
#price_reranking_level ⇒ String
How much price ranking we want in serving results. Price reranking causes
product items with a similar recommendation probability to be ordered by price,
with the highest-priced items first. This setting could result in a decrease
in click-through and conversion rates. Allowed values are: * no-price-
reranking
* low-price-reranking
* medium-price-reranking
* high-price-
reranking
If not specified, we choose default based on model type. Default
value: no-price-reranking
. Can only be set if solution_types is
SOLUTION_TYPE_RECOMMENDATION.
Corresponds to the JSON property priceRerankingLevel
8603 8604 8605 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8603 def price_reranking_level @price_reranking_level end |
#redirect_control_ids ⇒ Array<String>
Condition redirect specifications. Only the first triggered redirect action is
applied, even if multiple apply. Maximum number of specifications is 1000. Can
only be set if solution_types is SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property redirectControlIds
8610 8611 8612 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8610 def redirect_control_ids @redirect_control_ids end |
#replacement_control_ids ⇒ Array<String>
Condition replacement specifications. - Applied according to the order in the
list. - A previously replaced term can not be re-replaced. - Maximum number of
specifications is 100. Can only be set if solution_types is
SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property replacementControlIds
8618 8619 8620 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8618 def replacement_control_ids @replacement_control_ids end |
#solution_types ⇒ Array<String>
Required. Immutable. Specifies the solution types that a serving config can be
associated with. Currently we support setting only one type of solution.
Corresponds to the JSON property solutionTypes
8624 8625 8626 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8624 def solution_types @solution_types end |
#twoway_synonyms_control_ids ⇒ Array<String>
Condition synonyms specifications. If multiple syonyms conditions match, all
matching synonyms control in the list will execute. Order of controls in the
list will not matter. Maximum number of specifications is 100. Can only be set
if solution_types is SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property twowaySynonymsControlIds
8632 8633 8634 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8632 def twoway_synonyms_control_ids @twoway_synonyms_control_ids end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8639 def update!(**args) @boost_control_ids = args[:boost_control_ids] if args.key?(:boost_control_ids) @display_name = args[:display_name] if args.key?(:display_name) @diversity_level = args[:diversity_level] if args.key?(:diversity_level) @diversity_type = args[:diversity_type] if args.key?(:diversity_type) @do_not_associate_control_ids = args[:do_not_associate_control_ids] if args.key?(:do_not_associate_control_ids) @dynamic_facet_spec = args[:dynamic_facet_spec] if args.key?(:dynamic_facet_spec) @enable_category_filter_level = args[:enable_category_filter_level] if args.key?(:enable_category_filter_level) @facet_control_ids = args[:facet_control_ids] if args.key?(:facet_control_ids) @filter_control_ids = args[:filter_control_ids] if args.key?(:filter_control_ids) @ignore_control_ids = args[:ignore_control_ids] if args.key?(:ignore_control_ids) @ignore_recs_denylist = args[:ignore_recs_denylist] if args.key?(:ignore_recs_denylist) @model_id = args[:model_id] if args.key?(:model_id) @name = args[:name] if args.key?(:name) @oneway_synonyms_control_ids = args[:oneway_synonyms_control_ids] if args.key?(:oneway_synonyms_control_ids) @personalization_spec = args[:personalization_spec] if args.key?(:personalization_spec) @price_reranking_level = args[:price_reranking_level] if args.key?(:price_reranking_level) @redirect_control_ids = args[:redirect_control_ids] if args.key?(:redirect_control_ids) @replacement_control_ids = args[:replacement_control_ids] if args.key?(:replacement_control_ids) @solution_types = args[:solution_types] if args.key?(:solution_types) @twoway_synonyms_control_ids = args[:twoway_synonyms_control_ids] if args.key?(:twoway_synonyms_control_ids) end |