Class FindNeighborsRequest.Query (3.77.0) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version 3.77.0keyboard_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 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT) 
    
    
      com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int) 
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>) 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int) 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
   
  Static Fields
   
  
  
    
public   static   final   int   APPROXIMATE_NEIGHBOR_COUNT_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  
  
    
public   static   final   int   DATAPOINT_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  
  
    
public   static   final   int   FRACTION_LEAF_NODES_TO_SEARCH_OVERRIDE_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  
  
    
public   static   final   int   NEIGHBOR_COUNT_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  
  
    
public   static   final   int   PER_CROWDING_ATTRIBUTE_NEIGHBOR_COUNT_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  
  
    
public   static   final   int   RRF_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  Static Methods
   
  
    
public   static   FindNeighborsRequest . Query   getDefaultInstance ()  
  
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  
  
    
public   static   FindNeighborsRequest . Query . Builder   newBuilder ()  
  
  
    
public   static   FindNeighborsRequest . Query . Builder   newBuilder ( FindNeighborsRequest . Query   prototype )  
  
  
  
    
public   static   FindNeighborsRequest . Query   parseDelimitedFrom ( InputStream   input )  
  
  
  
  
    
public   static   FindNeighborsRequest . Query   parseDelimitedFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   FindNeighborsRequest . Query   parseFrom ( byte []   data )  
  
    
      
        Parameter  
      
        Name Description  
      
        databyte [] 
     
  
  
  
  
    
public   static   FindNeighborsRequest . Query   parseFrom ( byte []   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   FindNeighborsRequest . Query   parseFrom ( ByteString   data )  
  
  
  
  
    
public   static   FindNeighborsRequest . Query   parseFrom ( ByteString   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   FindNeighborsRequest . Query   parseFrom ( CodedInputStream   input )  
  
  
  
  
    
public   static   FindNeighborsRequest . Query   parseFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   FindNeighborsRequest . Query   parseFrom ( InputStream   input )  
  
  
  
  
    
public   static   FindNeighborsRequest . Query   parseFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   FindNeighborsRequest . Query   parseFrom ( ByteBuffer   data )  
  
  
  
  
    
public   static   FindNeighborsRequest . Query   parseFrom ( ByteBuffer   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   Parser<FindNeighborsRequest . Query >  parser ()  
  
  Methods
   
  
    
public   boolean   equals ( Object   obj )  
  
    
      
        Parameter  
      
        Name Description  
      
        objObject  
     
  
  
  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];
 
    
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];
 
    
public   FindNeighborsRequest . Query   getDefaultInstanceForType ()  
  
  
    
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 ()  
  
  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   FindNeighborsRequest . Query . RankingCase   getRankingCase ()  
  
  
    
public   FindNeighborsRequest . Query . RRF   getRrf ()  
   Optional. Represents RRF algorithm that combines search results.
 
 .google.cloud.aiplatform.v1beta1.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.v1beta1.FindNeighborsRequest.Query.RRF rrf = 6 [(.google.api.field_behavior) = OPTIONAL];
 
    
public   int   getSerializedSize ()  
  
    
      
        Returns  
      
        Type Description  
      
        int  
     
  
  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.
 
     
  
   Optional. Represents RRF algorithm that combines search results.
 
 .google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query.RRF rrf = 6 [(.google.api.field_behavior) = OPTIONAL];
 
    
      
        Returns  
      
        Type Description  
      
        boolean Whether the rrf field is set.
 
     
  
  
    
      
        Returns  
      
        Type Description  
      
        int  
     
  
  Overrides 
  
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
  
  Overrides 
  
  
    
public   final   boolean   isInitialized ()  
  
  Overrides 
  
  
    
public   FindNeighborsRequest . Query . Builder   newBuilderForType ()  
  
  
    
protected   FindNeighborsRequest . Query . Builder   newBuilderForType ( GeneratedMessageV3 . BuilderParent   parent )  
  
  
  Overrides 
  
  
    
protected   Object   newInstance ( GeneratedMessageV3 . UnusedPrivateParameter   unused )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Object  
     
  
  Overrides 
  
  
    
public   FindNeighborsRequest . Query . Builder   toBuilder ()  
  
  
    
public   void   writeTo ( CodedOutputStream   output )  
  
  Overrides 
  
  
 
     
    
  
  
  
     
  
    
    
      
       
    
    
  
  
 
  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-10-29 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-29 UTC."],[],[]]