Class NearestNeighborQuery.Parameters.Builder (3.41.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public NearestNeighborQuery.Parameters.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
NearestNeighborQuery.Parameters.Builder
Overrides

build()

public NearestNeighborQuery.Parameters build()
Returns
TypeDescription
NearestNeighborQuery.Parameters

buildPartial()

public NearestNeighborQuery.Parameters buildPartial()
Returns
TypeDescription
NearestNeighborQuery.Parameters

clear()

public NearestNeighborQuery.Parameters.Builder clear()
Returns
TypeDescription
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
TypeDescription
NearestNeighborQuery.Parameters.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public NearestNeighborQuery.Parameters.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
NearestNeighborQuery.Parameters.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public NearestNeighborQuery.Parameters.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
NearestNeighborQuery.Parameters.Builder
Overrides

clone()

public NearestNeighborQuery.Parameters.Builder clone()
Returns
TypeDescription
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
TypeDescription
int

The approximateNeighborCandidates.

getDefaultInstanceForType()

public NearestNeighborQuery.Parameters getDefaultInstanceForType()
Returns
TypeDescription
NearestNeighborQuery.Parameters

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
double

The leafNodesSearchFraction.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(NearestNeighborQuery.Parameters other)

public NearestNeighborQuery.Parameters.Builder mergeFrom(NearestNeighborQuery.Parameters other)
Parameter
NameDescription
otherNearestNeighborQuery.Parameters
Returns
TypeDescription
NearestNeighborQuery.Parameters.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public NearestNeighborQuery.Parameters.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NearestNeighborQuery.Parameters.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public NearestNeighborQuery.Parameters.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
NearestNeighborQuery.Parameters.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final NearestNeighborQuery.Parameters.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueint

The approximateNeighborCandidates to set.

Returns
TypeDescription
NearestNeighborQuery.Parameters.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public NearestNeighborQuery.Parameters.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valuedouble

The leafNodesSearchFraction to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
NearestNeighborQuery.Parameters.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final NearestNeighborQuery.Parameters.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
NearestNeighborQuery.Parameters.Builder
Overrides