Class SearchRequest.CustomRankingParams.Builder (0.90.0)

public static final class SearchRequest.CustomRankingParams.Builder extends GeneratedMessage.Builder<SearchRequest.CustomRankingParams.Builder> implements SearchRequest.CustomRankingParamsOrBuilder

Configuration parameters for the Custom Ranking feature.

Protobuf type google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllExpressionsToPrecompute(Iterable<String> values)

public SearchRequest.CustomRankingParams.Builder addAllExpressionsToPrecompute(Iterable<String> values)

Optional. A list of ranking expressions (see ranking_expression for the syntax documentation) to evaluate. The evaluation results will be returned in SearchResponse.SearchResult.rank_signals.precomputed_expression_values field.

repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The expressionsToPrecompute to add.

Returns
Type Description
SearchRequest.CustomRankingParams.Builder

This builder for chaining.

addExpressionsToPrecompute(String value)

public SearchRequest.CustomRankingParams.Builder addExpressionsToPrecompute(String value)

Optional. A list of ranking expressions (see ranking_expression for the syntax documentation) to evaluate. The evaluation results will be returned in SearchResponse.SearchResult.rank_signals.precomputed_expression_values field.

repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The expressionsToPrecompute to add.

Returns
Type Description
SearchRequest.CustomRankingParams.Builder

This builder for chaining.

addExpressionsToPrecomputeBytes(ByteString value)

public SearchRequest.CustomRankingParams.Builder addExpressionsToPrecomputeBytes(ByteString value)

Optional. A list of ranking expressions (see ranking_expression for the syntax documentation) to evaluate. The evaluation results will be returned in SearchResponse.SearchResult.rank_signals.precomputed_expression_values field.

repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the expressionsToPrecompute to add.

Returns
Type Description
SearchRequest.CustomRankingParams.Builder

This builder for chaining.

build()

public SearchRequest.CustomRankingParams build()
Returns
Type Description
SearchRequest.CustomRankingParams

buildPartial()

public SearchRequest.CustomRankingParams buildPartial()
Returns
Type Description
SearchRequest.CustomRankingParams

clear()

public SearchRequest.CustomRankingParams.Builder clear()
Returns
Type Description
SearchRequest.CustomRankingParams.Builder
Overrides

clearExpressionsToPrecompute()

public SearchRequest.CustomRankingParams.Builder clearExpressionsToPrecompute()

Optional. A list of ranking expressions (see ranking_expression for the syntax documentation) to evaluate. The evaluation results will be returned in SearchResponse.SearchResult.rank_signals.precomputed_expression_values field.

repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SearchRequest.CustomRankingParams.Builder

This builder for chaining.

getDefaultInstanceForType()

public SearchRequest.CustomRankingParams getDefaultInstanceForType()
Returns
Type Description
SearchRequest.CustomRankingParams

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getExpressionsToPrecompute(int index)

public String getExpressionsToPrecompute(int index)

Optional. A list of ranking expressions (see ranking_expression for the syntax documentation) to evaluate. The evaluation results will be returned in SearchResponse.SearchResult.rank_signals.precomputed_expression_values field.

repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The expressionsToPrecompute at the given index.

getExpressionsToPrecomputeBytes(int index)

public ByteString getExpressionsToPrecomputeBytes(int index)

Optional. A list of ranking expressions (see ranking_expression for the syntax documentation) to evaluate. The evaluation results will be returned in SearchResponse.SearchResult.rank_signals.precomputed_expression_values field.

repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the expressionsToPrecompute at the given index.

getExpressionsToPrecomputeCount()

public int getExpressionsToPrecomputeCount()

Optional. A list of ranking expressions (see ranking_expression for the syntax documentation) to evaluate. The evaluation results will be returned in SearchResponse.SearchResult.rank_signals.precomputed_expression_values field.

repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of expressionsToPrecompute.

getExpressionsToPrecomputeList()

public ProtocolStringList getExpressionsToPrecomputeList()

Optional. A list of ranking expressions (see ranking_expression for the syntax documentation) to evaluate. The evaluation results will be returned in SearchResponse.SearchResult.rank_signals.precomputed_expression_values field.

repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the expressionsToPrecompute.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SearchRequest.CustomRankingParams other)

public SearchRequest.CustomRankingParams.Builder mergeFrom(SearchRequest.CustomRankingParams other)
Parameter
Name Description
other SearchRequest.CustomRankingParams
Returns
Type Description
SearchRequest.CustomRankingParams.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SearchRequest.CustomRankingParams.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchRequest.CustomRankingParams.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SearchRequest.CustomRankingParams.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SearchRequest.CustomRankingParams.Builder
Overrides

setExpressionsToPrecompute(int index, String value)

public SearchRequest.CustomRankingParams.Builder setExpressionsToPrecompute(int index, String value)

Optional. A list of ranking expressions (see ranking_expression for the syntax documentation) to evaluate. The evaluation results will be returned in SearchResponse.SearchResult.rank_signals.precomputed_expression_values field.

repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The expressionsToPrecompute to set.

Returns
Type Description
SearchRequest.CustomRankingParams.Builder

This builder for chaining.