Class ServingConfig (0.36.0)

public final class ServingConfig extends GeneratedMessageV3 implements ServingConfigOrBuilder

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.

Protobuf type google.cloud.discoveryengine.v1alpha.ServingConfig

Static Fields

BOOST_CONTROL_IDS_FIELD_NUMBER

public static final int BOOST_CONTROL_IDS_FIELD_NUMBER
Field Value
TypeDescription
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

CUSTOM_FINE_TUNING_SPEC_FIELD_NUMBER

public static final int CUSTOM_FINE_TUNING_SPEC_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

DISSOCIATE_CONTROL_IDS_FIELD_NUMBER

public static final int DISSOCIATE_CONTROL_IDS_FIELD_NUMBER
Field Value
TypeDescription
int

DIVERSITY_LEVEL_FIELD_NUMBER

public static final int DIVERSITY_LEVEL_FIELD_NUMBER
Field Value
TypeDescription
int

EMBEDDING_CONFIG_FIELD_NUMBER

public static final int EMBEDDING_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

FILTER_CONTROL_IDS_FIELD_NUMBER

public static final int FILTER_CONTROL_IDS_FIELD_NUMBER
Field Value
TypeDescription
int

GENERIC_CONFIG_FIELD_NUMBER

public static final int GENERIC_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

GUIDED_SEARCH_SPEC_FIELD_NUMBER

public static final int GUIDED_SEARCH_SPEC_FIELD_NUMBER
Field Value
TypeDescription
int

IGNORE_CONTROL_IDS_FIELD_NUMBER

public static final int IGNORE_CONTROL_IDS_FIELD_NUMBER
Field Value
TypeDescription
int

MEDIA_CONFIG_FIELD_NUMBER

public static final int MEDIA_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

MODEL_ID_FIELD_NUMBER

public static final int MODEL_ID_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

ONEWAY_SYNONYMS_CONTROL_IDS_FIELD_NUMBER

public static final int ONEWAY_SYNONYMS_CONTROL_IDS_FIELD_NUMBER
Field Value
TypeDescription
int

RANKING_EXPRESSION_FIELD_NUMBER

public static final int RANKING_EXPRESSION_FIELD_NUMBER
Field Value
TypeDescription
int

REDIRECT_CONTROL_IDS_FIELD_NUMBER

public static final int REDIRECT_CONTROL_IDS_FIELD_NUMBER
Field Value
TypeDescription
int

REPLACEMENT_CONTROL_IDS_FIELD_NUMBER

public static final int REPLACEMENT_CONTROL_IDS_FIELD_NUMBER
Field Value
TypeDescription
int

SOLUTION_TYPE_FIELD_NUMBER

public static final int SOLUTION_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

SYNONYMS_CONTROL_IDS_FIELD_NUMBER

public static final int SYNONYMS_CONTROL_IDS_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ServingConfig getDefaultInstance()
Returns
TypeDescription
ServingConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static ServingConfig.Builder newBuilder()
Returns
TypeDescription
ServingConfig.Builder

newBuilder(ServingConfig prototype)

public static ServingConfig.Builder newBuilder(ServingConfig prototype)
Parameter
NameDescription
prototypeServingConfig
Returns
TypeDescription
ServingConfig.Builder

parseDelimitedFrom(InputStream input)

public static ServingConfig parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ServingConfig
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ServingConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServingConfig
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ServingConfig parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ServingConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ServingConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServingConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ServingConfig parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ServingConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ServingConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServingConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ServingConfig parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ServingConfig
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ServingConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServingConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ServingConfig parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ServingConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ServingConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServingConfig
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ServingConfig parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ServingConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ServingConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServingConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ServingConfig> parser()
Returns
TypeDescription
Parser<ServingConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getBoostControlIds(int index)

public String getBoostControlIds(int index)

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.

repeated string boost_control_ids = 12;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The boostControlIds at the given index.

getBoostControlIdsBytes(int index)

public ByteString getBoostControlIdsBytes(int index)

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.

repeated string boost_control_ids = 12;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the boostControlIds at the given index.

getBoostControlIdsCount()

public int getBoostControlIdsCount()

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.

repeated string boost_control_ids = 12;

Returns
TypeDescription
int

The count of boostControlIds.

getBoostControlIdsList()

public ProtocolStringList getBoostControlIdsList()

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.

repeated string boost_control_ids = 12;

Returns
TypeDescription
ProtocolStringList

A list containing the boostControlIds.

getCreateTime()

public Timestamp getCreateTime()

Output only. ServingConfig created timestamp.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. ServingConfig created timestamp.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getCustomFineTuningSpec()

public CustomFineTuningSpec getCustomFineTuningSpec()

Custom fine tuning configs.

.google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec custom_fine_tuning_spec = 24;

Returns
TypeDescription
CustomFineTuningSpec

The customFineTuningSpec.

getCustomFineTuningSpecOrBuilder()

public CustomFineTuningSpecOrBuilder getCustomFineTuningSpecOrBuilder()

Custom fine tuning configs.

.google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec custom_fine_tuning_spec = 24;

Returns
TypeDescription
CustomFineTuningSpecOrBuilder

getDefaultInstanceForType()

public ServingConfig getDefaultInstanceForType()
Returns
TypeDescription
ServingConfig

getDisplayName()

public String getDisplayName()

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 display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

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 display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for displayName.

getDissociateControlIds(int index)

public String getDissociateControlIds(int index)

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.

repeated string dissociate_control_ids = 17;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The dissociateControlIds at the given index.

getDissociateControlIdsBytes(int index)

public ByteString getDissociateControlIdsBytes(int index)

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.

repeated string dissociate_control_ids = 17;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the dissociateControlIds at the given index.

getDissociateControlIdsCount()

public int getDissociateControlIdsCount()

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.

repeated string dissociate_control_ids = 17;

Returns
TypeDescription
int

The count of dissociateControlIds.

getDissociateControlIdsList()

public ProtocolStringList getDissociateControlIdsList()

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.

repeated string dissociate_control_ids = 17;

Returns
TypeDescription
ProtocolStringList

A list containing the dissociateControlIds.

getDiversityLevel()

public String getDiversityLevel()

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.

string diversity_level = 5;

Returns
TypeDescription
String

The diversityLevel.

getDiversityLevelBytes()

public ByteString getDiversityLevelBytes()

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.

string diversity_level = 5;

Returns
TypeDescription
ByteString

The bytes for diversityLevel.

getEmbeddingConfig()

public EmbeddingConfig getEmbeddingConfig()

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.v1alpha.EmbeddingConfig embedding_config = 20;

Returns
TypeDescription
EmbeddingConfig

The embeddingConfig.

getEmbeddingConfigOrBuilder()

public EmbeddingConfigOrBuilder getEmbeddingConfigOrBuilder()

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.v1alpha.EmbeddingConfig embedding_config = 20;

Returns
TypeDescription
EmbeddingConfigOrBuilder

getFilterControlIds(int index)

public String getFilterControlIds(int index)

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.

repeated string filter_control_ids = 11;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The filterControlIds at the given index.

getFilterControlIdsBytes(int index)

public ByteString getFilterControlIdsBytes(int index)

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.

repeated string filter_control_ids = 11;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the filterControlIds at the given index.

getFilterControlIdsCount()

public int getFilterControlIdsCount()

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.

repeated string filter_control_ids = 11;

Returns
TypeDescription
int

The count of filterControlIds.

getFilterControlIdsList()

public ProtocolStringList getFilterControlIdsList()

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.

repeated string filter_control_ids = 11;

Returns
TypeDescription
ProtocolStringList

A list containing the filterControlIds.

getGenericConfig()

public ServingConfig.GenericConfig getGenericConfig()

The GenericConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.GenericConfig generic_config = 10;

Returns
TypeDescription
ServingConfig.GenericConfig

The genericConfig.

getGenericConfigOrBuilder()

public ServingConfig.GenericConfigOrBuilder getGenericConfigOrBuilder()

The GenericConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.GenericConfig generic_config = 10;

Returns
TypeDescription
ServingConfig.GenericConfigOrBuilder

getGuidedSearchSpec()

public GuidedSearchSpec getGuidedSearchSpec()

Guided search configs.

.google.cloud.discoveryengine.v1alpha.GuidedSearchSpec guided_search_spec = 22;

Returns
TypeDescription
GuidedSearchSpec

The guidedSearchSpec.

getGuidedSearchSpecOrBuilder()

public GuidedSearchSpecOrBuilder getGuidedSearchSpecOrBuilder()

Guided search configs.

.google.cloud.discoveryengine.v1alpha.GuidedSearchSpec guided_search_spec = 22;

Returns
TypeDescription
GuidedSearchSpecOrBuilder

getIgnoreControlIds(int index)

public String getIgnoreControlIds(int index)

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.

repeated string ignore_control_ids = 19;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The ignoreControlIds at the given index.

getIgnoreControlIdsBytes(int index)

public ByteString getIgnoreControlIdsBytes(int index)

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.

repeated string ignore_control_ids = 19;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the ignoreControlIds at the given index.

getIgnoreControlIdsCount()

public int getIgnoreControlIdsCount()

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.

repeated string ignore_control_ids = 19;

Returns
TypeDescription
int

The count of ignoreControlIds.

getIgnoreControlIdsList()

public ProtocolStringList getIgnoreControlIdsList()

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.

repeated string ignore_control_ids = 19;

Returns
TypeDescription
ProtocolStringList

A list containing the ignoreControlIds.

getMediaConfig()

public ServingConfig.MediaConfig getMediaConfig()

The MediaConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.MediaConfig media_config = 7;

Returns
TypeDescription
ServingConfig.MediaConfig

The mediaConfig.

getMediaConfigOrBuilder()

public ServingConfig.MediaConfigOrBuilder getMediaConfigOrBuilder()

The MediaConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.MediaConfig media_config = 7;

Returns
TypeDescription
ServingConfig.MediaConfigOrBuilder

getModelId()

public String getModelId()

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 model_id = 4;

Returns
TypeDescription
String

The modelId.

getModelIdBytes()

public ByteString getModelIdBytes()

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 model_id = 4;

Returns
TypeDescription
ByteString

The bytes for modelId.

getName()

public String getName()

Immutable. Fully qualified name projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Immutable. Fully qualified name projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ByteString

The bytes for name.

getOnewaySynonymsControlIds(int index)

public String getOnewaySynonymsControlIds(int index)

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.

repeated string oneway_synonyms_control_ids = 16;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The onewaySynonymsControlIds at the given index.

getOnewaySynonymsControlIdsBytes(int index)

public ByteString getOnewaySynonymsControlIdsBytes(int index)

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.

repeated string oneway_synonyms_control_ids = 16;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the onewaySynonymsControlIds at the given index.

getOnewaySynonymsControlIdsCount()

public int getOnewaySynonymsControlIdsCount()

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.

repeated string oneway_synonyms_control_ids = 16;

Returns
TypeDescription
int

The count of onewaySynonymsControlIds.

getOnewaySynonymsControlIdsList()

public ProtocolStringList getOnewaySynonymsControlIdsList()

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.

repeated string oneway_synonyms_control_ids = 16;

Returns
TypeDescription
ProtocolStringList

A list containing the onewaySynonymsControlIds.

getParserForType()

public Parser<ServingConfig> getParserForType()
Returns
TypeDescription
Parser<ServingConfig>
Overrides

getRankingExpression()

public String getRankingExpression()

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 ranking_expression = 21;

Returns
TypeDescription
String

The rankingExpression.

getRankingExpressionBytes()

public ByteString getRankingExpressionBytes()

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 ranking_expression = 21;

Returns
TypeDescription
ByteString

The bytes for rankingExpression.

getRedirectControlIds(int index)

public String getRedirectControlIds(int index)

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.

repeated string redirect_control_ids = 14;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The redirectControlIds at the given index.

getRedirectControlIdsBytes(int index)

public ByteString getRedirectControlIdsBytes(int index)

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.

repeated string redirect_control_ids = 14;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the redirectControlIds at the given index.

getRedirectControlIdsCount()

public int getRedirectControlIdsCount()

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.

repeated string redirect_control_ids = 14;

Returns
TypeDescription
int

The count of redirectControlIds.

getRedirectControlIdsList()

public ProtocolStringList getRedirectControlIdsList()

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.

repeated string redirect_control_ids = 14;

Returns
TypeDescription
ProtocolStringList

A list containing the redirectControlIds.

getReplacementControlIds(int index)

public String getReplacementControlIds(int index)

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.

repeated string replacement_control_ids = 18;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The replacementControlIds at the given index.

getReplacementControlIdsBytes(int index)

public ByteString getReplacementControlIdsBytes(int index)

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.

repeated string replacement_control_ids = 18;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the replacementControlIds at the given index.

getReplacementControlIdsCount()

public int getReplacementControlIdsCount()

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.

repeated string replacement_control_ids = 18;

Returns
TypeDescription
int

The count of replacementControlIds.

getReplacementControlIdsList()

public ProtocolStringList getReplacementControlIdsList()

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.

repeated string replacement_control_ids = 18;

Returns
TypeDescription
ProtocolStringList

A list containing the replacementControlIds.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSolutionType()

public SolutionType getSolutionType()

Required. Immutable. Specifies the solution type that a serving config can be associated with.

.google.cloud.discoveryengine.v1alpha.SolutionType solution_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
SolutionType

The solutionType.

getSolutionTypeValue()

public int getSolutionTypeValue()

Required. Immutable. Specifies the solution type that a serving config can be associated with.

.google.cloud.discoveryengine.v1alpha.SolutionType solution_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
int

The enum numeric value on the wire for solutionType.

getSynonymsControlIds(int index)

public String getSynonymsControlIds(int index)

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.

repeated string synonyms_control_ids = 15;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The synonymsControlIds at the given index.

getSynonymsControlIdsBytes(int index)

public ByteString getSynonymsControlIdsBytes(int index)

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.

repeated string synonyms_control_ids = 15;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the synonymsControlIds at the given index.

getSynonymsControlIdsCount()

public int getSynonymsControlIdsCount()

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.

repeated string synonyms_control_ids = 15;

Returns
TypeDescription
int

The count of synonymsControlIds.

getSynonymsControlIdsList()

public ProtocolStringList getSynonymsControlIdsList()

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.

repeated string synonyms_control_ids = 15;

Returns
TypeDescription
ProtocolStringList

A list containing the synonymsControlIds.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. ServingConfig updated timestamp.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. ServingConfig updated timestamp.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getVerticalConfigCase()

public ServingConfig.VerticalConfigCase getVerticalConfigCase()
Returns
TypeDescription
ServingConfig.VerticalConfigCase

hasCreateTime()

public boolean hasCreateTime()

Output only. ServingConfig created timestamp.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasCustomFineTuningSpec()

public boolean hasCustomFineTuningSpec()

Custom fine tuning configs.

.google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec custom_fine_tuning_spec = 24;

Returns
TypeDescription
boolean

Whether the customFineTuningSpec field is set.

hasEmbeddingConfig()

public boolean hasEmbeddingConfig()

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.v1alpha.EmbeddingConfig embedding_config = 20;

Returns
TypeDescription
boolean

Whether the embeddingConfig field is set.

hasGenericConfig()

public boolean hasGenericConfig()

The GenericConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.GenericConfig generic_config = 10;

Returns
TypeDescription
boolean

Whether the genericConfig field is set.

hasGuidedSearchSpec()

public boolean hasGuidedSearchSpec()

Guided search configs.

.google.cloud.discoveryengine.v1alpha.GuidedSearchSpec guided_search_spec = 22;

Returns
TypeDescription
boolean

Whether the guidedSearchSpec field is set.

hasMediaConfig()

public boolean hasMediaConfig()

The MediaConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.MediaConfig media_config = 7;

Returns
TypeDescription
boolean

Whether the mediaConfig field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. ServingConfig updated timestamp.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ServingConfig.Builder newBuilderForType()
Returns
TypeDescription
ServingConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ServingConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ServingConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ServingConfig.Builder toBuilder()
Returns
TypeDescription
ServingConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException