Send feedback
Class StructuredQuery.FindNearest (3.21.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 3.21.0 keyboard_arrow_down
public static final class StructuredQuery . FindNearest extends GeneratedMessageV3 implements StructuredQuery . FindNearestOrBuilder
Nearest Neighbors search config.
Protobuf type google.firestore.v1.StructuredQuery.FindNearest
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
DISTANCE_MEASURE_FIELD_NUMBER
public static final int DISTANCE_MEASURE_FIELD_NUMBER
Field Value
Type
Description
int
LIMIT_FIELD_NUMBER
public static final int LIMIT_FIELD_NUMBER
Field Value
Type
Description
int
QUERY_VECTOR_FIELD_NUMBER
public static final int QUERY_VECTOR_FIELD_NUMBER
Field Value
Type
Description
int
VECTOR_FIELD_FIELD_NUMBER
public static final int VECTOR_FIELD_FIELD_NUMBER
Field Value
Type
Description
int
Static Methods
getDefaultInstance()
public static StructuredQuery . FindNearest getDefaultInstance ()
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static StructuredQuery . FindNearest . Builder newBuilder ()
newBuilder(StructuredQuery.FindNearest prototype)
public static StructuredQuery . FindNearest . Builder newBuilder ( StructuredQuery . FindNearest prototype )
public static StructuredQuery . FindNearest parseDelimitedFrom ( InputStream input )
public static StructuredQuery . FindNearest parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(byte[] data)
public static StructuredQuery . FindNearest parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static StructuredQuery . FindNearest parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteString data)
public static StructuredQuery . FindNearest parseFrom ( ByteString data )
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static StructuredQuery . FindNearest parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static StructuredQuery . FindNearest parseFrom ( CodedInputStream input )
public static StructuredQuery . FindNearest parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static StructuredQuery . FindNearest parseFrom ( InputStream input )
public static StructuredQuery . FindNearest parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteBuffer data)
public static StructuredQuery . FindNearest parseFrom ( ByteBuffer data )
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static StructuredQuery . FindNearest parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
parser()
public static Parser<StructuredQuery . FindNearest > parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
Overrides
getDefaultInstanceForType()
public StructuredQuery . FindNearest getDefaultInstanceForType ()
getDistanceMeasure()
public StructuredQuery . FindNearest . DistanceMeasure getDistanceMeasure ()
Required. The Distance Measure to use, required.
.google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED];
getDistanceMeasureValue()
public int getDistanceMeasureValue ()
Required. The Distance Measure to use, required.
.google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
int
The enum numeric value on the wire for distanceMeasure.
getLimit()
public Int32Value getLimit ()
Required. The number of nearest neighbors to return. Must be a positive
integer of no more than 1000.
.google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED];
getLimitOrBuilder()
public Int32ValueOrBuilder getLimitOrBuilder ()
Required. The number of nearest neighbors to return. Must be a positive
integer of no more than 1000.
.google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED];
getParserForType()
public Parser<StructuredQuery . FindNearest > getParserForType ()
Overrides
getQueryVector()
public Value getQueryVector ()
Required. The query vector that we are searching on. Must be a vector of
no more than 2048 dimensions.
.google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
Value
The queryVector.
getQueryVectorOrBuilder()
public ValueOrBuilder getQueryVectorOrBuilder ()
Required. The query vector that we are searching on. Must be a vector of
no more than 2048 dimensions.
.google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED];
getSerializedSize()
public int getSerializedSize ()
Returns
Type
Description
int
Overrides
getVectorField()
public StructuredQuery . FieldReference getVectorField ()
Required. An indexed vector field to search upon. Only documents which
contain vectors whose dimensionality match the query_vector can be
returned.
.google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED];
getVectorFieldOrBuilder()
public StructuredQuery . FieldReferenceOrBuilder getVectorFieldOrBuilder ()
Required. An indexed vector field to search upon. Only documents which
contain vectors whose dimensionality match the query_vector can be
returned.
.google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED];
hasLimit()
public boolean hasLimit ()
Required. The number of nearest neighbors to return. Must be a positive
integer of no more than 1000.
.google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
boolean
Whether the limit field is set.
hasQueryVector()
public boolean hasQueryVector ()
Required. The query vector that we are searching on. Must be a vector of
no more than 2048 dimensions.
.google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
boolean
Whether the queryVector field is set.
hasVectorField()
public boolean hasVectorField ()
Required. An indexed vector field to search upon. Only documents which
contain vectors whose dimensionality match the query_vector can be
returned.
.google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
boolean
Whether the vectorField field is set.
hashCode()
Returns
Type
Description
int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public StructuredQuery . FindNearest . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected StructuredQuery . FindNearest . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
toBuilder()
public StructuredQuery . FindNearest . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
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-01-28 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-01-28 UTC."],[],[]]