Class NearestNeighborQuery.Parameters.Builder (3.56.0)

public static final class NearestNeighborQuery.Parameters.Builder extends GeneratedMessageV3.Builder<NearestNeighborQuery.Parameters.Builder> implements NearestNeighborQuery.ParametersOrBuilder

Parameters that can be overrided in each query to tune query latency and recall.

Protobuf type google.cloud.aiplatform.v1beta1.NearestNeighborQuery.Parameters

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public NearestNeighborQuery.Parameters.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
NearestNeighborQuery.Parameters.Builder
Overrides

build()

public NearestNeighborQuery.Parameters build()
Returns
Type Description
NearestNeighborQuery.Parameters

buildPartial()

public NearestNeighborQuery.Parameters buildPartial()
Returns
Type Description
NearestNeighborQuery.Parameters

clear()

public NearestNeighborQuery.Parameters.Builder clear()
Returns
Type Description
NearestNeighborQuery.Parameters.Builder
Overrides

clearApproximateNeighborCandidates()

public NearestNeighborQuery.Parameters.Builder clearApproximateNeighborCandidates()

Optional. The number of neighbors to find via approximate search before exact reordering is performed; if set, this value must be > neighbor_count.

int32 approximate_neighbor_candidates = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
NearestNeighborQuery.Parameters.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public NearestNeighborQuery.Parameters.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
NearestNeighborQuery.Parameters.Builder
Overrides

clearLeafNodesSearchFraction()

public NearestNeighborQuery.Parameters.Builder clearLeafNodesSearchFraction()

Optional. The fraction of the number of leaves to search, set at query time allows user to tune search performance. This value increase result in both search accuracy and latency increase. The value should be between 0.0 and 1.0.

double leaf_nodes_search_fraction = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
NearestNeighborQuery.Parameters.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public NearestNeighborQuery.Parameters.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
NearestNeighborQuery.Parameters.Builder
Overrides

clone()

public NearestNeighborQuery.Parameters.Builder clone()
Returns
Type Description
NearestNeighborQuery.Parameters.Builder
Overrides

getApproximateNeighborCandidates()

public int getApproximateNeighborCandidates()

Optional. The number of neighbors to find via approximate search before exact reordering is performed; if set, this value must be > neighbor_count.

int32 approximate_neighbor_candidates = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The approximateNeighborCandidates.

getDefaultInstanceForType()

public NearestNeighborQuery.Parameters getDefaultInstanceForType()
Returns
Type Description
NearestNeighborQuery.Parameters

getDescriptorForType()

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

getLeafNodesSearchFraction()

public double getLeafNodesSearchFraction()

Optional. The fraction of the number of leaves to search, set at query time allows user to tune search performance. This value increase result in both search accuracy and latency increase. The value should be between 0.0 and 1.0.

double leaf_nodes_search_fraction = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
double

The leafNodesSearchFraction.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(NearestNeighborQuery.Parameters other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final NearestNeighborQuery.Parameters.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
NearestNeighborQuery.Parameters.Builder
Overrides

setApproximateNeighborCandidates(int value)

public NearestNeighborQuery.Parameters.Builder setApproximateNeighborCandidates(int value)

Optional. The number of neighbors to find via approximate search before exact reordering is performed; if set, this value must be > neighbor_count.

int32 approximate_neighbor_candidates = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The approximateNeighborCandidates to set.

Returns
Type Description
NearestNeighborQuery.Parameters.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public NearestNeighborQuery.Parameters.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
NearestNeighborQuery.Parameters.Builder
Overrides

setLeafNodesSearchFraction(double value)

public NearestNeighborQuery.Parameters.Builder setLeafNodesSearchFraction(double value)

Optional. The fraction of the number of leaves to search, set at query time allows user to tune search performance. This value increase result in both search accuracy and latency increase. The value should be between 0.0 and 1.0.

double leaf_nodes_search_fraction = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value double

The leafNodesSearchFraction to set.

Returns
Type Description
NearestNeighborQuery.Parameters.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public NearestNeighborQuery.Parameters.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
NearestNeighborQuery.Parameters.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final NearestNeighborQuery.Parameters.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
NearestNeighborQuery.Parameters.Builder
Overrides