Reference documentation and code samples for the Retail V2 API class Google::Cloud::Retail::V2::ServingConfig.
Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions).
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#boost_control_ids
def boost_control_ids() -> ::Array<::String>
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#boost_control_ids=
def boost_control_ids=(value) -> ::Array<::String>
-
value (::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#display_name
def display_name() -> ::String
-
(::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.
#display_name=
def display_name=(value) -> ::String
-
value (::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.
-
(::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.
#diversity_level
def diversity_level() -> ::String
-
(::String) — How much diversity to use in recommendation model results e.g.
medium-diversity
orhigh-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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
#diversity_level=
def diversity_level=(value) -> ::String
-
value (::String) — How much diversity to use in recommendation model results e.g.
medium-diversity
orhigh-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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
-
(::String) — How much diversity to use in recommendation model results e.g.
medium-diversity
orhigh-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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
#diversity_type
def diversity_type() -> ::Google::Cloud::Retail::V2::ServingConfig::DiversityType
- (::Google::Cloud::Retail::V2::ServingConfig::DiversityType) — What kind of diversity to use - data driven or rule based. If unset, the server behavior defaults to RULE_BASED_DIVERSITY.
#diversity_type=
def diversity_type=(value) -> ::Google::Cloud::Retail::V2::ServingConfig::DiversityType
- value (::Google::Cloud::Retail::V2::ServingConfig::DiversityType) — What kind of diversity to use - data driven or rule based. If unset, the server behavior defaults to RULE_BASED_DIVERSITY.
- (::Google::Cloud::Retail::V2::ServingConfig::DiversityType) — What kind of diversity to use - data driven or rule based. If unset, the server behavior defaults to RULE_BASED_DIVERSITY.
#do_not_associate_control_ids
def do_not_associate_control_ids() -> ::Array<::String>
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#do_not_associate_control_ids=
def do_not_associate_control_ids=(value) -> ::Array<::String>
-
value (::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#dynamic_facet_spec
def dynamic_facet_spec() -> ::Google::Cloud::Retail::V2::SearchRequest::DynamicFacetSpec
-
(::Google::Cloud::Retail::V2::SearchRequest::DynamicFacetSpec) — The specification for dynamically generated facets. Notice that only
textual facets can be dynamically generated.
Can only be set if solution_types is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#dynamic_facet_spec=
def dynamic_facet_spec=(value) -> ::Google::Cloud::Retail::V2::SearchRequest::DynamicFacetSpec
-
value (::Google::Cloud::Retail::V2::SearchRequest::DynamicFacetSpec) — The specification for dynamically generated facets. Notice that only
textual facets can be dynamically generated.
Can only be set if solution_types is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
-
(::Google::Cloud::Retail::V2::SearchRequest::DynamicFacetSpec) — The specification for dynamically generated facets. Notice that only
textual facets can be dynamically generated.
Can only be set if solution_types is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#enable_category_filter_level
def enable_category_filter_level() -> ::String
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
#enable_category_filter_level=
def enable_category_filter_level=(value) -> ::String
-
value (::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
#facet_control_ids
def facet_control_ids() -> ::Array<::String>
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#facet_control_ids=
def facet_control_ids=(value) -> ::Array<::String>
-
value (::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#filter_control_ids
def filter_control_ids() -> ::Array<::String>
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#filter_control_ids=
def filter_control_ids=(value) -> ::Array<::String>
-
value (::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#ignore_control_ids
def ignore_control_ids() -> ::Array<::String>
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#ignore_control_ids=
def ignore_control_ids=(value) -> ::Array<::String>
-
value (::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#model_id
def model_id() -> ::String
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
#model_id=
def model_id=(value) -> ::String
-
value (::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
#name
def name() -> ::String
-
(::String) — Immutable. Fully qualified name
projects/*/locations/global/catalogs/*/servingConfig/*
#name=
def name=(value) -> ::String
-
value (::String) — Immutable. Fully qualified name
projects/*/locations/global/catalogs/*/servingConfig/*
-
(::String) — Immutable. Fully qualified name
projects/*/locations/global/catalogs/*/servingConfig/*
#oneway_synonyms_control_ids
def oneway_synonyms_control_ids() -> ::Array<::String>
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#oneway_synonyms_control_ids=
def oneway_synonyms_control_ids=(value) -> ::Array<::String>
-
value (::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#personalization_spec
def personalization_spec() -> ::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec
-
(::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec) — The specification for personalization spec.
Can only be set if solution_types is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
Notice that if both ServingConfig.personalization_spec and SearchRequest.personalization_spec are set. SearchRequest.personalization_spec will override ServingConfig.personalization_spec.
#personalization_spec=
def personalization_spec=(value) -> ::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec
-
value (::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec) — The specification for personalization spec.
Can only be set if solution_types is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
Notice that if both ServingConfig.personalization_spec and SearchRequest.personalization_spec are set. SearchRequest.personalization_spec will override ServingConfig.personalization_spec.
-
(::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec) — The specification for personalization spec.
Can only be set if solution_types is [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
Notice that if both ServingConfig.personalization_spec and SearchRequest.personalization_spec are set. SearchRequest.personalization_spec will override ServingConfig.personalization_spec.
#price_reranking_level
def price_reranking_level() -> ::String
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
#price_reranking_level=
def price_reranking_level=(value) -> ::String
-
value (::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
#redirect_control_ids
def redirect_control_ids() -> ::Array<::String>
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#redirect_control_ids=
def redirect_control_ids=(value) -> ::Array<::String>
-
value (::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#replacement_control_ids
def replacement_control_ids() -> ::Array<::String>
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#replacement_control_ids=
def replacement_control_ids=(value) -> ::Array<::String>
-
value (::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#solution_types
def solution_types() -> ::Array<::Google::Cloud::Retail::V2::SolutionType>
- (::Array<::Google::Cloud::Retail::V2::SolutionType>) — Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.
#solution_types=
def solution_types=(value) -> ::Array<::Google::Cloud::Retail::V2::SolutionType>
- value (::Array<::Google::Cloud::Retail::V2::SolutionType>) — Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.
- (::Array<::Google::Cloud::Retail::V2::SolutionType>) — Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.
#twoway_synonyms_control_ids
def twoway_synonyms_control_ids() -> ::Array<::String>
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
#twoway_synonyms_control_ids=
def twoway_synonyms_control_ids=(value) -> ::Array<::String>
-
value (::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
-
(::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][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].