Send feedback
Class FindNeighborsRequest.Query (3.13.0)
bookmark_border bookmark
Stay organized with collections
Save and categorize content based on your preferences.
Version 3.13.0 keyboard_arrow_down
public static final class FindNeighborsRequest . Query extends GeneratedMessageV3 implements FindNeighborsRequest . QueryOrBuilder
A query to find a number of the nearest neighbors (most similar vectors)
of a vector.
Protobuf type google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query
Inherited Members
Static Fields
public static final int APPROXIMATE_NEIGHBOR_COUNT_FIELD_NUMBER
Field Value
public static final int DATAPOINT_FIELD_NUMBER
Field Value
public static final int FRACTION_LEAF_NODES_TO_SEARCH_OVERRIDE_FIELD_NUMBER
Field Value
public static final int NEIGHBOR_COUNT_FIELD_NUMBER
Field Value
public static final int PER_CROWDING_ATTRIBUTE_NEIGHBOR_COUNT_FIELD_NUMBER
Field Value
Static Methods
public static FindNeighborsRequest . Query getDefaultInstance ()
Returns
public static final Descriptors . Descriptor getDescriptor ()
Returns
public static FindNeighborsRequest . Query . Builder newBuilder ()
Returns
public static FindNeighborsRequest . Query . Builder newBuilder ( FindNeighborsRequest . Query prototype )
Parameter
Returns
public static FindNeighborsRequest . Query parseDelimitedFrom ( InputStream input )
Parameter
Returns
Exceptions
public static FindNeighborsRequest . Query parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static FindNeighborsRequest . Query parseFrom ( byte [] data )
Parameter
Name Description data
byte []
Returns
Exceptions
public static FindNeighborsRequest . Query parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static FindNeighborsRequest . Query parseFrom ( ByteString data )
Parameter
Returns
Exceptions
public static FindNeighborsRequest . Query parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static FindNeighborsRequest . Query parseFrom ( CodedInputStream input )
Parameter
Returns
Exceptions
public static FindNeighborsRequest . Query parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static FindNeighborsRequest . Query parseFrom ( InputStream input )
Parameter
Returns
Exceptions
public static FindNeighborsRequest . Query parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static FindNeighborsRequest . Query parseFrom ( ByteBuffer data )
Parameter
Returns
Exceptions
public static FindNeighborsRequest . Query parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static Parser<FindNeighborsRequest . Query > parser ()
Returns
Methods
public boolean equals ( Object obj )
Parameter
Returns
Overrides
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;
Returns
Type Description int
The approximateNeighborCount.
public IndexDatapoint getDatapoint ()
Required. The datapoint/vector whose nearest neighbors should be searched
for.
.google.cloud.aiplatform.v1beta1.IndexDatapoint datapoint = 1 [(.google.api.field_behavior) = REQUIRED];
Returns
public IndexDatapointOrBuilder getDatapointOrBuilder ()
Required. The datapoint/vector whose nearest neighbors should be searched
for.
.google.cloud.aiplatform.v1beta1.IndexDatapoint datapoint = 1 [(.google.api.field_behavior) = REQUIRED];
Returns
public FindNeighborsRequest . Query getDefaultInstanceForType ()
Returns
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;
Returns
Type Description double
The fractionLeafNodesToSearchOverride.
public int getNeighborCount ()
Returns
Type Description int
The neighborCount.
public Parser<FindNeighborsRequest . Query > getParserForType ()
Returns
Overrides
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;
Returns
Type Description int
The perCrowdingAttributeNeighborCount.
public int getSerializedSize ()
Returns
Overrides
public final UnknownFieldSet getUnknownFields ()
Returns
Overrides
public boolean hasDatapoint ()
Required. The datapoint/vector whose nearest neighbors should be searched
for.
.google.cloud.aiplatform.v1beta1.IndexDatapoint datapoint = 1 [(.google.api.field_behavior) = REQUIRED];
Returns
Type Description boolean
Whether the datapoint field is set.
Returns
Overrides
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Returns
Overrides
public final boolean isInitialized ()
Returns
Overrides
public FindNeighborsRequest . Query . Builder newBuilderForType ()
Returns
protected FindNeighborsRequest . Query . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Parameter
Returns
Overrides
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Parameter
Returns
Overrides
public FindNeighborsRequest . Query . Builder toBuilder ()
Returns
public void writeTo ( CodedOutputStream output )
Parameter
Overrides
Exceptions
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-03 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-03 UTC."],[],[]]