public sealed class ServingConfig : IMessage<ServingConfig>, IEquatable<ServingConfig>, IDeepCloneable<ServingConfig>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1beta API class 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.
Implements
IMessageServingConfig, IEquatableServingConfig, IDeepCloneableServingConfig, IBufferMessage, IMessageNamespace
Google.Cloud.DiscoveryEngine.V1BetaAssembly
Google.Cloud.DiscoveryEngine.V1Beta.dll
Constructors
ServingConfig()
public ServingConfig()
ServingConfig(ServingConfig)
public ServingConfig(ServingConfig other)
Parameter | |
---|---|
Name | Description |
other | ServingConfig |
Properties
BoostControlIds
public RepeatedField<string> BoostControlIds { get; }
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.
Property Value | |
---|---|
Type | Description |
RepeatedFieldstring |
CreateTime
public Timestamp CreateTime { get; set; }
Output only. ServingConfig created timestamp.
Property Value | |
---|---|
Type | Description |
Timestamp |
DisplayName
public string DisplayName { get; set; }
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.
Property Value | |
---|---|
Type | Description |
string |
DissociateControlIds
public RepeatedField<string> DissociateControlIds { get; }
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][google.cloud.discoveryengine.v1beta.SolutionType] is [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
Property Value | |
---|---|
Type | Description |
RepeatedFieldstring |
DiversityLevel
public string DiversityLevel { get; set; }
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][google.cloud.discoveryengine.v1beta.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
Property Value | |
---|---|
Type | Description |
string |
EmbeddingConfig
public EmbeddingConfig EmbeddingConfig { get; set; }
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][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector] and the document embeddings that are provided by this EmbeddingConfig. If [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector] is provided, it overrides this [ServingConfig.embedding_config][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
Property Value | |
---|---|
Type | Description |
EmbeddingConfig |
FilterControlIds
public RepeatedField<string> FilterControlIds { get; }
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.
Property Value | |
---|---|
Type | Description |
RepeatedFieldstring |
GenericConfig
public ServingConfig.Types.GenericConfig GenericConfig { get; set; }
The GenericConfig of the serving configuration.
Property Value | |
---|---|
Type | Description |
ServingConfigTypesGenericConfig |
IgnoreControlIds
public RepeatedField<string> IgnoreControlIds { get; }
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.
Property Value | |
---|---|
Type | Description |
RepeatedFieldstring |
MediaConfig
public ServingConfig.Types.MediaConfig MediaConfig { get; set; }
The MediaConfig of the serving configuration.
Property Value | |
---|---|
Type | Description |
ServingConfigTypesMediaConfig |
ModelId
public string ModelId { get; set; }
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][google.cloud.discoveryengine.v1beta.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
Property Value | |
---|---|
Type | Description |
string |
Name
public string Name { get; set; }
Immutable. Fully qualified name
projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}
Property Value | |
---|---|
Type | Description |
string |
OnewaySynonymsControlIds
public RepeatedField<string> OnewaySynonymsControlIds { get; }
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][google.cloud.discoveryengine.v1beta.SolutionType] is [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
Property Value | |
---|---|
Type | Description |
RepeatedFieldstring |
RankingExpression
public string RankingExpression { get; set; }
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][google.cloud.discoveryengine.v1beta.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).
Property Value | |
---|---|
Type | Description |
string |
RedirectControlIds
public RepeatedField<string> RedirectControlIds { get; }
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][google.cloud.discoveryengine.v1beta.SolutionType] is [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
Property Value | |
---|---|
Type | Description |
RepeatedFieldstring |
ReplacementControlIds
public RepeatedField<string> ReplacementControlIds { get; }
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][google.cloud.discoveryengine.v1beta.SolutionType] is [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
Property Value | |
---|---|
Type | Description |
RepeatedFieldstring |
ServingConfigName
public ServingConfigName ServingConfigName { get; set; }
ServingConfigName-typed view over the Name resource name property.
Property Value | |
---|---|
Type | Description |
ServingConfigName |
SolutionType
public SolutionType SolutionType { get; set; }
Required. Immutable. Specifies the solution type that a serving config can be associated with.
Property Value | |
---|---|
Type | Description |
SolutionType |
SynonymsControlIds
public RepeatedField<string> SynonymsControlIds { get; }
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][google.cloud.discoveryengine.v1beta.SolutionType] is [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
Property Value | |
---|---|
Type | Description |
RepeatedFieldstring |
UpdateTime
public Timestamp UpdateTime { get; set; }
Output only. ServingConfig updated timestamp.
Property Value | |
---|---|
Type | Description |
Timestamp |
VerticalConfigCase
public ServingConfig.VerticalConfigOneofCase VerticalConfigCase { get; }
Property Value | |
---|---|
Type | Description |
ServingConfigVerticalConfigOneofCase |