Class StructuredQuery.FindNearest.Builder (3.21.1)

public static final class StructuredQuery.FindNearest.Builder extends GeneratedMessageV3.Builder<StructuredQuery.FindNearest.Builder> implements StructuredQuery.FindNearestOrBuilder

Nearest Neighbors search config.

Protobuf type google.firestore.v1.StructuredQuery.FindNearest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public StructuredQuery.FindNearest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
StructuredQuery.FindNearest.Builder
Overrides

build()

public StructuredQuery.FindNearest build()
Returns
Type Description
StructuredQuery.FindNearest

buildPartial()

public StructuredQuery.FindNearest buildPartial()
Returns
Type Description
StructuredQuery.FindNearest

clear()

public StructuredQuery.FindNearest.Builder clear()
Returns
Type Description
StructuredQuery.FindNearest.Builder
Overrides

clearDistanceMeasure()

public StructuredQuery.FindNearest.Builder clearDistanceMeasure()

Required. The Distance Measure to use, required.

.google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
StructuredQuery.FindNearest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public StructuredQuery.FindNearest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
StructuredQuery.FindNearest.Builder
Overrides

clearLimit()

public StructuredQuery.FindNearest.Builder clearLimit()

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
StructuredQuery.FindNearest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public StructuredQuery.FindNearest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
StructuredQuery.FindNearest.Builder
Overrides

clearQueryVector()

public StructuredQuery.FindNearest.Builder clearQueryVector()

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
StructuredQuery.FindNearest.Builder

clearVectorField()

public StructuredQuery.FindNearest.Builder clearVectorField()

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
StructuredQuery.FindNearest.Builder

clone()

public StructuredQuery.FindNearest.Builder clone()
Returns
Type Description
StructuredQuery.FindNearest.Builder
Overrides

getDefaultInstanceForType()

public StructuredQuery.FindNearest getDefaultInstanceForType()
Returns
Type Description
StructuredQuery.FindNearest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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];

Returns
Type Description
StructuredQuery.FindNearest.DistanceMeasure

The distanceMeasure.

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];

Returns
Type Description
Int32Value

The limit.

getLimitBuilder()

public Int32Value.Builder getLimitBuilder()

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
Builder

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];

Returns
Type Description
Int32ValueOrBuilder

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.

getQueryVectorBuilder()

public Value.Builder getQueryVectorBuilder()

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.Builder

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];

Returns
Type Description
ValueOrBuilder

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];

Returns
Type Description
StructuredQuery.FieldReference

The vectorField.

getVectorFieldBuilder()

public StructuredQuery.FieldReference.Builder getVectorFieldBuilder()

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
StructuredQuery.FieldReference.Builder

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];

Returns
Type Description
StructuredQuery.FieldReferenceOrBuilder

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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(StructuredQuery.FindNearest other)

public StructuredQuery.FindNearest.Builder mergeFrom(StructuredQuery.FindNearest other)
Parameter
Name Description
other StructuredQuery.FindNearest
Returns
Type Description
StructuredQuery.FindNearest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public StructuredQuery.FindNearest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StructuredQuery.FindNearest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public StructuredQuery.FindNearest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
StructuredQuery.FindNearest.Builder
Overrides

mergeLimit(Int32Value value)

public StructuredQuery.FindNearest.Builder mergeLimit(Int32Value value)

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];

Parameter
Name Description
value Int32Value
Returns
Type Description
StructuredQuery.FindNearest.Builder

mergeQueryVector(Value value)

public StructuredQuery.FindNearest.Builder mergeQueryVector(Value value)

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];

Parameter
Name Description
value Value
Returns
Type Description
StructuredQuery.FindNearest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final StructuredQuery.FindNearest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
StructuredQuery.FindNearest.Builder
Overrides

mergeVectorField(StructuredQuery.FieldReference value)

public StructuredQuery.FindNearest.Builder mergeVectorField(StructuredQuery.FieldReference value)

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];

Parameter
Name Description
value StructuredQuery.FieldReference
Returns
Type Description
StructuredQuery.FindNearest.Builder

setDistanceMeasure(StructuredQuery.FindNearest.DistanceMeasure value)

public StructuredQuery.FindNearest.Builder setDistanceMeasure(StructuredQuery.FindNearest.DistanceMeasure value)

Required. The Distance Measure to use, required.

.google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value StructuredQuery.FindNearest.DistanceMeasure

The distanceMeasure to set.

Returns
Type Description
StructuredQuery.FindNearest.Builder

This builder for chaining.

setDistanceMeasureValue(int value)

public StructuredQuery.FindNearest.Builder setDistanceMeasureValue(int value)

Required. The Distance Measure to use, required.

.google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for distanceMeasure to set.

Returns
Type Description
StructuredQuery.FindNearest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public StructuredQuery.FindNearest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
StructuredQuery.FindNearest.Builder
Overrides

setLimit(Int32Value value)

public StructuredQuery.FindNearest.Builder setLimit(Int32Value value)

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];

Parameter
Name Description
value Int32Value
Returns
Type Description
StructuredQuery.FindNearest.Builder

setLimit(Int32Value.Builder builderForValue)

public StructuredQuery.FindNearest.Builder setLimit(Int32Value.Builder builderForValue)

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];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
StructuredQuery.FindNearest.Builder

setQueryVector(Value value)

public StructuredQuery.FindNearest.Builder setQueryVector(Value value)

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];

Parameter
Name Description
value Value
Returns
Type Description
StructuredQuery.FindNearest.Builder

setQueryVector(Value.Builder builderForValue)

public StructuredQuery.FindNearest.Builder setQueryVector(Value.Builder builderForValue)

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];

Parameter
Name Description
builderForValue Value.Builder
Returns
Type Description
StructuredQuery.FindNearest.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public StructuredQuery.FindNearest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
StructuredQuery.FindNearest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final StructuredQuery.FindNearest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
StructuredQuery.FindNearest.Builder
Overrides

setVectorField(StructuredQuery.FieldReference value)

public StructuredQuery.FindNearest.Builder setVectorField(StructuredQuery.FieldReference value)

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];

Parameter
Name Description
value StructuredQuery.FieldReference
Returns
Type Description
StructuredQuery.FindNearest.Builder

setVectorField(StructuredQuery.FieldReference.Builder builderForValue)

public StructuredQuery.FindNearest.Builder setVectorField(StructuredQuery.FieldReference.Builder builderForValue)

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];

Parameter
Name Description
builderForValue StructuredQuery.FieldReference.Builder
Returns
Type Description
StructuredQuery.FindNearest.Builder