Discovery Engine V1BETA API - Class Google::Cloud::DiscoveryEngine::V1beta::ServingConfig (v0.17.0)

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>
Returns
  • (::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>
Parameter
  • 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.
Returns
  • (::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
Returns

#display_name

def display_name() -> ::String
Returns
  • (::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
Parameter
  • 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.

Returns
  • (::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>
Returns
  • (::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>
Parameter
  • 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.

Returns
  • (::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
Returns
  • (::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 SolutionType is SOLUTION_TYPE_RECOMMENDATION.

#diversity_level=

def diversity_level=(value) -> ::String
Parameter
  • value (::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 SolutionType is SOLUTION_TYPE_RECOMMENDATION.

Returns
  • (::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 SolutionType is SOLUTION_TYPE_RECOMMENDATION.

#embedding_config

def embedding_config() -> ::Google::Cloud::DiscoveryEngine::V1beta::EmbeddingConfig
Returns

#embedding_config=

def embedding_config=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::EmbeddingConfig
Parameter
Returns

#filter_control_ids

def filter_control_ids() -> ::Array<::String>
Returns
  • (::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>
Parameter
  • 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.
Returns
  • (::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
Returns

#generic_config=

def generic_config=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig::GenericConfig
Parameter
Returns

#ignore_control_ids

def ignore_control_ids() -> ::Array<::String>
Returns
  • (::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>
Parameter
  • 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.
Returns
  • (::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
Returns

#media_config=

def media_config=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig::MediaConfig
Parameter
Returns

#model_id

def model_id() -> ::String
Returns
  • (::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
Parameter
  • 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.

Returns
  • (::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
Returns
  • (::String) — Immutable. Fully qualified name projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}

#name=

def name=(value) -> ::String
Parameter
  • value (::String) — Immutable. Fully qualified name projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}
Returns
  • (::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>
Returns
  • (::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>
Parameter
  • 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.

Returns
  • (::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.

#personalization_spec

def personalization_spec() -> ::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::PersonalizationSpec

#personalization_spec=

def personalization_spec=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::PersonalizationSpec

#ranking_expression

def ranking_expression() -> ::String
Returns
  • (::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
Parameter
  • 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).

Returns
  • (::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>
Returns
  • (::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>
Parameter
  • 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.

Returns
  • (::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>
Returns
  • (::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>
Parameter
  • 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.

Returns
  • (::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
Returns

#solution_type=

def solution_type=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::SolutionType
Parameter
Returns

#synonyms_control_ids

def synonyms_control_ids() -> ::Array<::String>
Returns
  • (::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>
Parameter
  • 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.

Returns
  • (::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
Returns