Class ReciprocalRankFusion.Builder (0.6.0)

public static final class ReciprocalRankFusion.Builder extends GeneratedMessage.Builder<ReciprocalRankFusion.Builder> implements ReciprocalRankFusionOrBuilder

Defines the Reciprocal Rank Fusion (RRF) algorithm for result ranking.

Protobuf type google.cloud.vectorsearch.v1beta.ReciprocalRankFusion

Static Methods

getDescriptor()

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

Methods

addAllWeights(Iterable<? extends Double> values)

public ReciprocalRankFusion.Builder addAllWeights(Iterable<? extends Double> values)

Required. The weights to apply to each search result set during fusion.

repeated double weights = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<? extends java.lang.Double>

The weights to add.

Returns
Type Description
ReciprocalRankFusion.Builder

This builder for chaining.

addWeights(double value)

public ReciprocalRankFusion.Builder addWeights(double value)

Required. The weights to apply to each search result set during fusion.

repeated double weights = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value double

The weights to add.

Returns
Type Description
ReciprocalRankFusion.Builder

This builder for chaining.

build()

public ReciprocalRankFusion build()
Returns
Type Description
ReciprocalRankFusion

buildPartial()

public ReciprocalRankFusion buildPartial()
Returns
Type Description
ReciprocalRankFusion

clear()

public ReciprocalRankFusion.Builder clear()
Returns
Type Description
ReciprocalRankFusion.Builder
Overrides

clearWeights()

public ReciprocalRankFusion.Builder clearWeights()

Required. The weights to apply to each search result set during fusion.

repeated double weights = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ReciprocalRankFusion.Builder

This builder for chaining.

getDefaultInstanceForType()

public ReciprocalRankFusion getDefaultInstanceForType()
Returns
Type Description
ReciprocalRankFusion

getDescriptorForType()

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

getWeights(int index)

public double getWeights(int index)

Required. The weights to apply to each search result set during fusion.

repeated double weights = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
double

The weights at the given index.

getWeightsCount()

public int getWeightsCount()

Required. The weights to apply to each search result set during fusion.

repeated double weights = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of weights.

getWeightsList()

public List<Double> getWeightsList()

Required. The weights to apply to each search result set during fusion.

repeated double weights = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Double>

A list containing the weights.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ReciprocalRankFusion other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setWeights(int index, double value)

public ReciprocalRankFusion.Builder setWeights(int index, double value)

Required. The weights to apply to each search result set during fusion.

repeated double weights = 1 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value double

The weights to set.

Returns
Type Description
ReciprocalRankFusion.Builder

This builder for chaining.