public static final class FindNeighborsRequest.Query.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<FindNeighborsRequest.Query.Builder> implements FindNeighborsRequest.QueryOrBuilder
A query to find a number of the nearest neighbors (most similar vectors) of a vector.Protobuf type
google.cloud.aiplatform.v1.FindNeighborsRequest.Query| Modifier and Type | Method and Description |
|---|---|
FindNeighborsRequest.Query.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
FindNeighborsRequest.Query |
build() |
FindNeighborsRequest.Query |
buildPartial() |
FindNeighborsRequest.Query.Builder |
clear() |
FindNeighborsRequest.Query.Builder |
clearApproximateNeighborCount()
The number of neighbors to find via approximate search before
exact reordering is performed.
|
FindNeighborsRequest.Query.Builder |
clearDatapoint()
Required.
|
FindNeighborsRequest.Query.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
FindNeighborsRequest.Query.Builder |
clearFractionLeafNodesToSearchOverride()
The fraction of the number of leaves to search, set at query time allows
user to tune search performance.
|
FindNeighborsRequest.Query.Builder |
clearNeighborCount()
The number of nearest neighbors to be retrieved from database for each
query.
|
FindNeighborsRequest.Query.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
FindNeighborsRequest.Query.Builder |
clearPerCrowdingAttributeNeighborCount()
Crowding is a constraint on a neighbor list produced by nearest neighbor
search requiring that no more than some value k' of the k neighbors
returned have the same value of crowding_attribute.
|
FindNeighborsRequest.Query.Builder |
clearRanking() |
FindNeighborsRequest.Query.Builder |
clearRrf()
Optional.
|
FindNeighborsRequest.Query.Builder |
clone() |
int |
getApproximateNeighborCount()
The number of neighbors to find via approximate search before
exact reordering is performed.
|
IndexDatapoint |
getDatapoint()
Required.
|
IndexDatapoint.Builder |
getDatapointBuilder()
Required.
|
IndexDatapointOrBuilder |
getDatapointOrBuilder()
Required.
|
FindNeighborsRequest.Query |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
double |
getFractionLeafNodesToSearchOverride()
The fraction of the number of leaves to search, set at query time allows
user to tune search performance.
|
int |
getNeighborCount()
The number of nearest neighbors to be retrieved from database for each
query.
|
int |
getPerCrowdingAttributeNeighborCount()
Crowding is a constraint on a neighbor list produced by nearest neighbor
search requiring that no more than some value k' of the k neighbors
returned have the same value of crowding_attribute.
|
FindNeighborsRequest.Query.RankingCase |
getRankingCase() |
FindNeighborsRequest.Query.RRF |
getRrf()
Optional.
|
FindNeighborsRequest.Query.RRF.Builder |
getRrfBuilder()
Optional.
|
FindNeighborsRequest.Query.RRFOrBuilder |
getRrfOrBuilder()
Optional.
|
boolean |
hasDatapoint()
Required.
|
boolean |
hasRrf()
Optional.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
FindNeighborsRequest.Query.Builder |
mergeDatapoint(IndexDatapoint value)
Required.
|
FindNeighborsRequest.Query.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
FindNeighborsRequest.Query.Builder |
mergeFrom(FindNeighborsRequest.Query other) |
FindNeighborsRequest.Query.Builder |
mergeFrom(com.google.protobuf.Message other) |
FindNeighborsRequest.Query.Builder |
mergeRrf(FindNeighborsRequest.Query.RRF value)
Optional.
|
FindNeighborsRequest.Query.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
FindNeighborsRequest.Query.Builder |
setApproximateNeighborCount(int value)
The number of neighbors to find via approximate search before
exact reordering is performed.
|
FindNeighborsRequest.Query.Builder |
setDatapoint(IndexDatapoint.Builder builderForValue)
Required.
|
FindNeighborsRequest.Query.Builder |
setDatapoint(IndexDatapoint value)
Required.
|
FindNeighborsRequest.Query.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
FindNeighborsRequest.Query.Builder |
setFractionLeafNodesToSearchOverride(double value)
The fraction of the number of leaves to search, set at query time allows
user to tune search performance.
|
FindNeighborsRequest.Query.Builder |
setNeighborCount(int value)
The number of nearest neighbors to be retrieved from database for each
query.
|
FindNeighborsRequest.Query.Builder |
setPerCrowdingAttributeNeighborCount(int value)
Crowding is a constraint on a neighbor list produced by nearest neighbor
search requiring that no more than some value k' of the k neighbors
returned have the same value of crowding_attribute.
|
FindNeighborsRequest.Query.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
FindNeighborsRequest.Query.Builder |
setRrf(FindNeighborsRequest.Query.RRF.Builder builderForValue)
Optional.
|
FindNeighborsRequest.Query.Builder |
setRrf(FindNeighborsRequest.Query.RRF value)
Optional.
|
FindNeighborsRequest.Query.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<FindNeighborsRequest.Query.Builder>public FindNeighborsRequest.Query.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<FindNeighborsRequest.Query.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<FindNeighborsRequest.Query.Builder>public FindNeighborsRequest.Query getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic FindNeighborsRequest.Query build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic FindNeighborsRequest.Query buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic FindNeighborsRequest.Query.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<FindNeighborsRequest.Query.Builder>public FindNeighborsRequest.Query.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<FindNeighborsRequest.Query.Builder>public FindNeighborsRequest.Query.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<FindNeighborsRequest.Query.Builder>public FindNeighborsRequest.Query.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<FindNeighborsRequest.Query.Builder>public FindNeighborsRequest.Query.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<FindNeighborsRequest.Query.Builder>public FindNeighborsRequest.Query.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<FindNeighborsRequest.Query.Builder>public FindNeighborsRequest.Query.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<FindNeighborsRequest.Query.Builder>public FindNeighborsRequest.Query.Builder mergeFrom(FindNeighborsRequest.Query other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<FindNeighborsRequest.Query.Builder>public FindNeighborsRequest.Query.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<FindNeighborsRequest.Query.Builder>IOExceptionpublic FindNeighborsRequest.Query.RankingCase getRankingCase()
getRankingCase in interface FindNeighborsRequest.QueryOrBuilderpublic FindNeighborsRequest.Query.Builder clearRanking()
public boolean hasRrf()
Optional. Represents RRF algorithm that combines search results.
.google.cloud.aiplatform.v1.FindNeighborsRequest.Query.RRF rrf = 6 [(.google.api.field_behavior) = OPTIONAL];
hasRrf in interface FindNeighborsRequest.QueryOrBuilderpublic FindNeighborsRequest.Query.RRF getRrf()
Optional. Represents RRF algorithm that combines search results.
.google.cloud.aiplatform.v1.FindNeighborsRequest.Query.RRF rrf = 6 [(.google.api.field_behavior) = OPTIONAL];
getRrf in interface FindNeighborsRequest.QueryOrBuilderpublic FindNeighborsRequest.Query.Builder setRrf(FindNeighborsRequest.Query.RRF value)
Optional. Represents RRF algorithm that combines search results.
.google.cloud.aiplatform.v1.FindNeighborsRequest.Query.RRF rrf = 6 [(.google.api.field_behavior) = OPTIONAL];
public FindNeighborsRequest.Query.Builder setRrf(FindNeighborsRequest.Query.RRF.Builder builderForValue)
Optional. Represents RRF algorithm that combines search results.
.google.cloud.aiplatform.v1.FindNeighborsRequest.Query.RRF rrf = 6 [(.google.api.field_behavior) = OPTIONAL];
public FindNeighborsRequest.Query.Builder mergeRrf(FindNeighborsRequest.Query.RRF value)
Optional. Represents RRF algorithm that combines search results.
.google.cloud.aiplatform.v1.FindNeighborsRequest.Query.RRF rrf = 6 [(.google.api.field_behavior) = OPTIONAL];
public FindNeighborsRequest.Query.Builder clearRrf()
Optional. Represents RRF algorithm that combines search results.
.google.cloud.aiplatform.v1.FindNeighborsRequest.Query.RRF rrf = 6 [(.google.api.field_behavior) = OPTIONAL];
public FindNeighborsRequest.Query.RRF.Builder getRrfBuilder()
Optional. Represents RRF algorithm that combines search results.
.google.cloud.aiplatform.v1.FindNeighborsRequest.Query.RRF rrf = 6 [(.google.api.field_behavior) = OPTIONAL];
public FindNeighborsRequest.Query.RRFOrBuilder getRrfOrBuilder()
Optional. Represents RRF algorithm that combines search results.
.google.cloud.aiplatform.v1.FindNeighborsRequest.Query.RRF rrf = 6 [(.google.api.field_behavior) = OPTIONAL];
getRrfOrBuilder in interface FindNeighborsRequest.QueryOrBuilderpublic boolean hasDatapoint()
Required. The datapoint/vector whose nearest neighbors should be searched for.
.google.cloud.aiplatform.v1.IndexDatapoint datapoint = 1 [(.google.api.field_behavior) = REQUIRED];
hasDatapoint in interface FindNeighborsRequest.QueryOrBuilderpublic IndexDatapoint getDatapoint()
Required. The datapoint/vector whose nearest neighbors should be searched for.
.google.cloud.aiplatform.v1.IndexDatapoint datapoint = 1 [(.google.api.field_behavior) = REQUIRED];
getDatapoint in interface FindNeighborsRequest.QueryOrBuilderpublic FindNeighborsRequest.Query.Builder setDatapoint(IndexDatapoint value)
Required. The datapoint/vector whose nearest neighbors should be searched for.
.google.cloud.aiplatform.v1.IndexDatapoint datapoint = 1 [(.google.api.field_behavior) = REQUIRED];
public FindNeighborsRequest.Query.Builder setDatapoint(IndexDatapoint.Builder builderForValue)
Required. The datapoint/vector whose nearest neighbors should be searched for.
.google.cloud.aiplatform.v1.IndexDatapoint datapoint = 1 [(.google.api.field_behavior) = REQUIRED];
public FindNeighborsRequest.Query.Builder mergeDatapoint(IndexDatapoint value)
Required. The datapoint/vector whose nearest neighbors should be searched for.
.google.cloud.aiplatform.v1.IndexDatapoint datapoint = 1 [(.google.api.field_behavior) = REQUIRED];
public FindNeighborsRequest.Query.Builder clearDatapoint()
Required. The datapoint/vector whose nearest neighbors should be searched for.
.google.cloud.aiplatform.v1.IndexDatapoint datapoint = 1 [(.google.api.field_behavior) = REQUIRED];
public IndexDatapoint.Builder getDatapointBuilder()
Required. The datapoint/vector whose nearest neighbors should be searched for.
.google.cloud.aiplatform.v1.IndexDatapoint datapoint = 1 [(.google.api.field_behavior) = REQUIRED];
public IndexDatapointOrBuilder getDatapointOrBuilder()
Required. The datapoint/vector whose nearest neighbors should be searched for.
.google.cloud.aiplatform.v1.IndexDatapoint datapoint = 1 [(.google.api.field_behavior) = REQUIRED];
getDatapointOrBuilder in interface FindNeighborsRequest.QueryOrBuilderpublic int getNeighborCount()
The number of nearest neighbors to be retrieved from database for each query. If not set, will use the default from the service configuration (https://cloud.google.com/vertex-ai/docs/matching-engine/configuring-indexes#nearest-neighbor-search-config).
int32 neighbor_count = 2;getNeighborCount in interface FindNeighborsRequest.QueryOrBuilderpublic FindNeighborsRequest.Query.Builder setNeighborCount(int value)
The number of nearest neighbors to be retrieved from database for each query. If not set, will use the default from the service configuration (https://cloud.google.com/vertex-ai/docs/matching-engine/configuring-indexes#nearest-neighbor-search-config).
int32 neighbor_count = 2;value - The neighborCount to set.public FindNeighborsRequest.Query.Builder clearNeighborCount()
The number of nearest neighbors to be retrieved from database for each query. If not set, will use the default from the service configuration (https://cloud.google.com/vertex-ai/docs/matching-engine/configuring-indexes#nearest-neighbor-search-config).
int32 neighbor_count = 2;public int getPerCrowdingAttributeNeighborCount()
Crowding is a constraint on a neighbor list produced by nearest neighbor search requiring that no more than some value k' of the k neighbors returned have the same value of crowding_attribute. It's used for improving result diversity. This field is the maximum number of matches with the same crowding tag.
int32 per_crowding_attribute_neighbor_count = 3;getPerCrowdingAttributeNeighborCount in interface FindNeighborsRequest.QueryOrBuilderpublic FindNeighborsRequest.Query.Builder setPerCrowdingAttributeNeighborCount(int value)
Crowding is a constraint on a neighbor list produced by nearest neighbor search requiring that no more than some value k' of the k neighbors returned have the same value of crowding_attribute. It's used for improving result diversity. This field is the maximum number of matches with the same crowding tag.
int32 per_crowding_attribute_neighbor_count = 3;value - The perCrowdingAttributeNeighborCount to set.public FindNeighborsRequest.Query.Builder clearPerCrowdingAttributeNeighborCount()
Crowding is a constraint on a neighbor list produced by nearest neighbor search requiring that no more than some value k' of the k neighbors returned have the same value of crowding_attribute. It's used for improving result diversity. This field is the maximum number of matches with the same crowding tag.
int32 per_crowding_attribute_neighbor_count = 3;public int getApproximateNeighborCount()
The number of neighbors to find via approximate search before exact reordering is performed. If not set, the default value from scam config is used; if set, this value must be > 0.
int32 approximate_neighbor_count = 4;getApproximateNeighborCount in interface FindNeighborsRequest.QueryOrBuilderpublic FindNeighborsRequest.Query.Builder setApproximateNeighborCount(int value)
The number of neighbors to find via approximate search before exact reordering is performed. If not set, the default value from scam config is used; if set, this value must be > 0.
int32 approximate_neighbor_count = 4;value - The approximateNeighborCount to set.public FindNeighborsRequest.Query.Builder clearApproximateNeighborCount()
The number of neighbors to find via approximate search before exact reordering is performed. If not set, the default value from scam config is used; if set, this value must be > 0.
int32 approximate_neighbor_count = 4;public double getFractionLeafNodesToSearchOverride()
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. If not set or set to 0.0, query uses the default value specified in NearestNeighborSearchConfig.TreeAHConfig.fraction_leaf_nodes_to_search.
double fraction_leaf_nodes_to_search_override = 5;getFractionLeafNodesToSearchOverride in interface FindNeighborsRequest.QueryOrBuilderpublic FindNeighborsRequest.Query.Builder setFractionLeafNodesToSearchOverride(double value)
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. If not set or set to 0.0, query uses the default value specified in NearestNeighborSearchConfig.TreeAHConfig.fraction_leaf_nodes_to_search.
double fraction_leaf_nodes_to_search_override = 5;value - The fractionLeafNodesToSearchOverride to set.public FindNeighborsRequest.Query.Builder clearFractionLeafNodesToSearchOverride()
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. If not set or set to 0.0, query uses the default value specified in NearestNeighborSearchConfig.TreeAHConfig.fraction_leaf_nodes_to_search.
double fraction_leaf_nodes_to_search_override = 5;public final FindNeighborsRequest.Query.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<FindNeighborsRequest.Query.Builder>public final FindNeighborsRequest.Query.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<FindNeighborsRequest.Query.Builder>Copyright © 2025 Google LLC. All rights reserved.