Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::ServingConfig.
Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions). The ServingConfig is passed in the search and predict request and generates results.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#boost_control_ids
def boost_control_ids() -> ::Array<::String>
- (::Array<::String>) — Boost controls to use in serving path. All triggered boost controls will be applied. Boost controls must be in the same data store as the serving config. Maximum of 20 boost controls.
#boost_control_ids=
def boost_control_ids=(value) -> ::Array<::String>
- value (::Array<::String>) — Boost controls to use in serving path. All triggered boost controls will be applied. Boost controls must be in the same data store as the serving config. Maximum of 20 boost controls.
- (::Array<::String>) — Boost controls to use in serving path. All triggered boost controls will be applied. Boost controls must be in the same data store as the serving config. Maximum of 20 boost controls.
#create_time
def create_time() -> ::Google::Protobuf::Timestamp
- (::Google::Protobuf::Timestamp) — Output only. ServingConfig created timestamp.
#display_name
def display_name() -> ::String
-
(::String) — Required. The human readable serving config display name. Used in Discovery
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 Discovery
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 Discovery
UI.
This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
#dissociate_control_ids
def dissociate_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 SolutionType is SOLUTION_TYPE_SEARCH.
#dissociate_control_ids=
def dissociate_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 SolutionType is 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 SolutionType is SOLUTION_TYPE_SEARCH.
#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 SolutionType is 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 SolutionType is 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 SolutionType is SOLUTION_TYPE_RECOMMENDATION.
#embedding_config
def embedding_config() -> ::Google::Cloud::DiscoveryEngine::V1beta::EmbeddingConfig
- (::Google::Cloud::DiscoveryEngine::V1beta::EmbeddingConfig) — Bring your own embedding config. The config is used for search semantic retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config.
#embedding_config=
def embedding_config=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::EmbeddingConfig
- value (::Google::Cloud::DiscoveryEngine::V1beta::EmbeddingConfig) — Bring your own embedding config. The config is used for search semantic retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config.
- (::Google::Cloud::DiscoveryEngine::V1beta::EmbeddingConfig) — Bring your own embedding config. The config is used for search semantic retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config.
#filter_control_ids
def filter_control_ids() -> ::Array<::String>
- (::Array<::String>) — Filter controls to use in serving path. All triggered filter controls will be applied. Filter controls must be in the same data store as the serving config. Maximum of 20 filter controls.
#filter_control_ids=
def filter_control_ids=(value) -> ::Array<::String>
- value (::Array<::String>) — Filter controls to use in serving path. All triggered filter controls will be applied. Filter controls must be in the same data store as the serving config. Maximum of 20 filter controls.
- (::Array<::String>) — Filter controls to use in serving path. All triggered filter controls will be applied. Filter controls must be in the same data store as the serving config. Maximum of 20 filter controls.
#generic_config
def generic_config() -> ::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig::GenericConfig
- (::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig::GenericConfig) — The GenericConfig of the serving configuration.
#generic_config=
def generic_config=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig::GenericConfig
- value (::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig::GenericConfig) — The GenericConfig of the serving configuration.
- (::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig::GenericConfig) — The GenericConfig of the serving configuration.
#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.
#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.
- (::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.
#media_config
def media_config() -> ::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig::MediaConfig
- (::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig::MediaConfig) — The MediaConfig of the serving configuration.
#media_config=
def media_config=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig::MediaConfig
- value (::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig::MediaConfig) — The MediaConfig of the serving configuration.
- (::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig::MediaConfig) — The MediaConfig of the serving configuration.
#model_id
def model_id() -> ::String
-
(::String) — The id of the model to use at serving time.
Currently only RecommendationModels are supported.
Can be changed but only to a compatible model (e.g.
others-you-may-like CTR to others-you-may-like CVR).
Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION.
#model_id=
def model_id=(value) -> ::String
-
value (::String) — The id of the model to use at serving time.
Currently only RecommendationModels are supported.
Can be changed but only to a compatible model (e.g.
others-you-may-like CTR to others-you-may-like CVR).
Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION.
-
(::String) — The id of the model to use at serving time.
Currently only RecommendationModels are supported.
Can be changed but only to a compatible model (e.g.
others-you-may-like CTR to others-you-may-like CVR).
Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION.
#name
def name() -> ::String
-
(::String) — Immutable. Fully qualified name
projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}
#name=
def name=(value) -> ::String
-
value (::String) — Immutable. Fully qualified name
projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}
-
(::String) — Immutable. Fully qualified name
projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}
#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. Maximum number of specifications is 100.
Can only be set if SolutionType is 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. Maximum number of specifications is 100.
Can only be set if SolutionType is 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. Maximum number of specifications is 100.
Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.
#ranking_expression
def ranking_expression() -> ::String
-
(::String) — The ranking expression controls the customized ranking on retrieval
documents. To leverage this, document embedding is required. The ranking
expression setting in ServingConfig applies to all search requests served
by the serving config. However, if
SearchRequest.ranking_expression
is specified, it overrides the ServingConfig ranking expression.
The ranking expression is a single function or multiple functions that are joined by "+".
- ranking_expression = function, { " + ", function };
Supported functions:
- double * relevance_score
- double * dotProduct(embedding_field_path)
Function variables:
relevance_score
: pre-defined keywords, used for measure relevance between query and document.embedding_field_path
: the document embedding field used with query embedding vector.dotProduct
: embedding function between embedding_field_path and query embedding vector.
Example ranking expression:
If document has an embedding field doc_embedding, the ranking expression could be
0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)
.
#ranking_expression=
def ranking_expression=(value) -> ::String
-
value (::String) — The ranking expression controls the customized ranking on retrieval
documents. To leverage this, document embedding is required. The ranking
expression setting in ServingConfig applies to all search requests served
by the serving config. However, if
SearchRequest.ranking_expression
is specified, it overrides the ServingConfig ranking expression.
The ranking expression is a single function or multiple functions that are joined by "+".
- ranking_expression = function, { " + ", function };
Supported functions:
- double * relevance_score
- double * dotProduct(embedding_field_path)
Function variables:
relevance_score
: pre-defined keywords, used for measure relevance between query and document.embedding_field_path
: the document embedding field used with query embedding vector.dotProduct
: embedding function between embedding_field_path and query embedding vector.
Example ranking expression:
If document has an embedding field doc_embedding, the ranking expression could be
0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)
.
-
(::String) — The ranking expression controls the customized ranking on retrieval
documents. To leverage this, document embedding is required. The ranking
expression setting in ServingConfig applies to all search requests served
by the serving config. However, if
SearchRequest.ranking_expression
is specified, it overrides the ServingConfig ranking expression.
The ranking expression is a single function or multiple functions that are joined by "+".
- ranking_expression = function, { " + ", function };
Supported functions:
- double * relevance_score
- double * dotProduct(embedding_field_path)
Function variables:
relevance_score
: pre-defined keywords, used for measure relevance between query and document.embedding_field_path
: the document embedding field used with query embedding vector.dotProduct
: embedding function between embedding_field_path and query embedding vector.
Example ranking expression:
If document has an embedding field doc_embedding, the ranking expression could be
0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)
.
#redirect_control_ids
def redirect_control_ids() -> ::Array<::String>
-
(::Array<::String>) — IDs of the redirect controls. Only the first triggered redirect
action is applied, even if multiple apply. Maximum number of
specifications is 100.
Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.
#redirect_control_ids=
def redirect_control_ids=(value) -> ::Array<::String>
-
value (::Array<::String>) — IDs of the redirect controls. Only the first triggered redirect
action is applied, even if multiple apply. Maximum number of
specifications is 100.
Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.
-
(::Array<::String>) — IDs of the redirect controls. Only the first triggered redirect
action is applied, even if multiple apply. Maximum number of
specifications is 100.
Can only be set if SolutionType is 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 SolutionType is 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 SolutionType is 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 SolutionType is SOLUTION_TYPE_SEARCH.
#solution_type
def solution_type() -> ::Google::Cloud::DiscoveryEngine::V1beta::SolutionType
- (::Google::Cloud::DiscoveryEngine::V1beta::SolutionType) — Required. Immutable. Specifies the solution type that a serving config can be associated with.
#solution_type=
def solution_type=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::SolutionType
- value (::Google::Cloud::DiscoveryEngine::V1beta::SolutionType) — Required. Immutable. Specifies the solution type that a serving config can be associated with.
- (::Google::Cloud::DiscoveryEngine::V1beta::SolutionType) — Required. Immutable. Specifies the solution type that a serving config can be associated with.
#synonyms_control_ids
def synonyms_control_ids() -> ::Array<::String>
-
(::Array<::String>) — Condition synonyms specifications. If multiple synonyms conditions
match, all matching synonyms controls in the list will execute.
Maximum number of specifications is 100.
Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.
#synonyms_control_ids=
def synonyms_control_ids=(value) -> ::Array<::String>
-
value (::Array<::String>) — Condition synonyms specifications. If multiple synonyms conditions
match, all matching synonyms controls in the list will execute.
Maximum number of specifications is 100.
Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.
-
(::Array<::String>) — Condition synonyms specifications. If multiple synonyms conditions
match, all matching synonyms controls in the list will execute.
Maximum number of specifications is 100.
Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.
#update_time
def update_time() -> ::Google::Protobuf::Timestamp
- (::Google::Protobuf::Timestamp) — Output only. ServingConfig updated timestamp.