Class FindNearest.Builder (2.28.2)
Stay organized with collections
Save and categorize content based on your preferences.
publicstaticfinalclass FindNearest.BuilderextendsGeneratedMessageV3.Builder<FindNearest.Builder>implementsFindNearestOrBuilderNearest Neighbors search config. The ordering provided by FindNearest supersedes the order_by stage. If multiple documents have the same vector distance, the returned document order is not guaranteed to be stable between queries.
Protobuf type google.datastore.v1.FindNearest
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > FindNearest.BuilderImplements
FindNearestOrBuilderInherited Members
Static Methods
getDescriptor()
publicstaticfinalDescriptors.DescriptorgetDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
publicFindNearest.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
build()
publicFindNearestbuild()| Returns | |
|---|---|
| Type | Description |
FindNearest |
|
buildPartial()
publicFindNearestbuildPartial()| Returns | |
|---|---|
| Type | Description |
FindNearest |
|
clear()
publicFindNearest.Builderclear()| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
clearDistanceMeasure()
publicFindNearest.BuilderclearDistanceMeasure()Required. The Distance Measure to use, required.
.google.datastore.v1.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
This builder for chaining. |
clearDistanceResultProperty()
publicFindNearest.BuilderclearDistanceResultProperty()Optional. Optional name of the field to output the result of the vector distance calculation. Must conform to entity property limitations.
string distance_result_property = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
This builder for chaining. |
clearDistanceThreshold()
publicFindNearest.BuilderclearDistanceThreshold() Optional. Option to specify a threshold for which no less similar documents
will be returned. The behavior of the specified distance_measure will
affect the meaning of the distance threshold. Since DOT_PRODUCT distances
increase when the vectors are more similar, the comparison is inverted.
For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold For DOT_PRODUCT: WHERE distance >= distance_threshold
.google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
clearField(Descriptors.FieldDescriptor field)
publicFindNearest.BuilderclearField(Descriptors.FieldDescriptorfield)| Parameter | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
clearLimit()
publicFindNearest.BuilderclearLimit()Required. The number of nearest neighbors to return. Must be a positive integer of no more than 100.
.google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
clearOneof(Descriptors.OneofDescriptor oneof)
publicFindNearest.BuilderclearOneof(Descriptors.OneofDescriptoroneof)| Parameter | |
|---|---|
| Name | Description |
oneof |
OneofDescriptor |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
clearQueryVector()
publicFindNearest.BuilderclearQueryVector()Required. The query vector that we are searching on. Must be a vector of no more than 2048 dimensions.
.google.datastore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
clearVectorProperty()
publicFindNearest.BuilderclearVectorProperty()Required. An indexed vector property to search upon. Only documents which contain vectors whose dimensionality match the query_vector can be returned.
.google.datastore.v1.PropertyReference vector_property = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
clone()
publicFindNearest.Builderclone()| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
getDefaultInstanceForType()
publicFindNearestgetDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
FindNearest |
|
getDescriptorForType()
publicDescriptors.DescriptorgetDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getDistanceMeasure()
publicFindNearest.DistanceMeasuregetDistanceMeasure()Required. The Distance Measure to use, required.
.google.datastore.v1.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
FindNearest.DistanceMeasure |
The distanceMeasure. |
getDistanceMeasureValue()
publicintgetDistanceMeasureValue()Required. The Distance Measure to use, required.
.google.datastore.v1.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for distanceMeasure. |
getDistanceResultProperty()
publicStringgetDistanceResultProperty()Optional. Optional name of the field to output the result of the vector distance calculation. Must conform to entity property limitations.
string distance_result_property = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The distanceResultProperty. |
getDistanceResultPropertyBytes()
publicByteStringgetDistanceResultPropertyBytes()Optional. Optional name of the field to output the result of the vector distance calculation. Must conform to entity property limitations.
string distance_result_property = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for distanceResultProperty. |
getDistanceThreshold()
publicDoubleValuegetDistanceThreshold() Optional. Option to specify a threshold for which no less similar documents
will be returned. The behavior of the specified distance_measure will
affect the meaning of the distance threshold. Since DOT_PRODUCT distances
increase when the vectors are more similar, the comparison is inverted.
For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold For DOT_PRODUCT: WHERE distance >= distance_threshold
.google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
DoubleValue |
The distanceThreshold. |
getDistanceThresholdBuilder()
publicDoubleValue.BuildergetDistanceThresholdBuilder() Optional. Option to specify a threshold for which no less similar documents
will be returned. The behavior of the specified distance_measure will
affect the meaning of the distance threshold. Since DOT_PRODUCT distances
increase when the vectors are more similar, the comparison is inverted.
For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold For DOT_PRODUCT: WHERE distance >= distance_threshold
.google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Builder |
|
getDistanceThresholdOrBuilder()
publicDoubleValueOrBuildergetDistanceThresholdOrBuilder() Optional. Option to specify a threshold for which no less similar documents
will be returned. The behavior of the specified distance_measure will
affect the meaning of the distance threshold. Since DOT_PRODUCT distances
increase when the vectors are more similar, the comparison is inverted.
For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold For DOT_PRODUCT: WHERE distance >= distance_threshold
.google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
DoubleValueOrBuilder |
|
getLimit()
publicInt32ValuegetLimit()Required. The number of nearest neighbors to return. Must be a positive integer of no more than 100.
.google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Int32Value |
The limit. |
getLimitBuilder()
publicInt32Value.BuildergetLimitBuilder()Required. The number of nearest neighbors to return. Must be a positive integer of no more than 100.
.google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Builder |
|
getLimitOrBuilder()
publicInt32ValueOrBuildergetLimitOrBuilder()Required. The number of nearest neighbors to return. Must be a positive integer of no more than 100.
.google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Int32ValueOrBuilder |
|
getQueryVector()
publicValuegetQueryVector()Required. The query vector that we are searching on. Must be a vector of no more than 2048 dimensions.
.google.datastore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Value |
The queryVector. |
getQueryVectorBuilder()
publicValue.BuildergetQueryVectorBuilder()Required. The query vector that we are searching on. Must be a vector of no more than 2048 dimensions.
.google.datastore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Value.Builder |
|
getQueryVectorOrBuilder()
publicValueOrBuildergetQueryVectorOrBuilder()Required. The query vector that we are searching on. Must be a vector of no more than 2048 dimensions.
.google.datastore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ValueOrBuilder |
|
getVectorProperty()
publicPropertyReferencegetVectorProperty()Required. An indexed vector property to search upon. Only documents which contain vectors whose dimensionality match the query_vector can be returned.
.google.datastore.v1.PropertyReference vector_property = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
PropertyReference |
The vectorProperty. |
getVectorPropertyBuilder()
publicPropertyReference.BuildergetVectorPropertyBuilder()Required. An indexed vector property to search upon. Only documents which contain vectors whose dimensionality match the query_vector can be returned.
.google.datastore.v1.PropertyReference vector_property = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
PropertyReference.Builder |
|
getVectorPropertyOrBuilder()
publicPropertyReferenceOrBuildergetVectorPropertyOrBuilder()Required. An indexed vector property to search upon. Only documents which contain vectors whose dimensionality match the query_vector can be returned.
.google.datastore.v1.PropertyReference vector_property = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
PropertyReferenceOrBuilder |
|
hasDistanceThreshold()
publicbooleanhasDistanceThreshold() Optional. Option to specify a threshold for which no less similar documents
will be returned. The behavior of the specified distance_measure will
affect the meaning of the distance threshold. Since DOT_PRODUCT distances
increase when the vectors are more similar, the comparison is inverted.
For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold For DOT_PRODUCT: WHERE distance >= distance_threshold
.google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the distanceThreshold field is set. |
hasLimit()
publicbooleanhasLimit()Required. The number of nearest neighbors to return. Must be a positive integer of no more than 100.
.google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the limit field is set. |
hasQueryVector()
publicbooleanhasQueryVector()Required. The query vector that we are searching on. Must be a vector of no more than 2048 dimensions.
.google.datastore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the queryVector field is set. |
hasVectorProperty()
publicbooleanhasVectorProperty()Required. An indexed vector property to search upon. Only documents which contain vectors whose dimensionality match the query_vector can be returned.
.google.datastore.v1.PropertyReference vector_property = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the vectorProperty field is set. |
internalGetFieldAccessorTable()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
publicfinalbooleanisInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeDistanceThreshold(DoubleValue value)
publicFindNearest.BuildermergeDistanceThreshold(DoubleValuevalue) Optional. Option to specify a threshold for which no less similar documents
will be returned. The behavior of the specified distance_measure will
affect the meaning of the distance threshold. Since DOT_PRODUCT distances
increase when the vectors are more similar, the comparison is inverted.
For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold For DOT_PRODUCT: WHERE distance >= distance_threshold
.google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
DoubleValue |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
mergeFrom(FindNearest other)
publicFindNearest.BuildermergeFrom(FindNearestother)| Parameter | |
|---|---|
| Name | Description |
other |
FindNearest |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
publicFindNearest.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
publicFindNearest.BuildermergeFrom(Messageother)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
mergeLimit(Int32Value value)
publicFindNearest.BuildermergeLimit(Int32Valuevalue)Required. The number of nearest neighbors to return. Must be a positive integer of no more than 100.
.google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
Int32Value |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
mergeQueryVector(Value value)
publicFindNearest.BuildermergeQueryVector(Valuevalue)Required. The query vector that we are searching on. Must be a vector of no more than 2048 dimensions.
.google.datastore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
Value |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
publicfinalFindNearest.BuildermergeUnknownFields(UnknownFieldSetunknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
mergeVectorProperty(PropertyReference value)
publicFindNearest.BuildermergeVectorProperty(PropertyReferencevalue)Required. An indexed vector property to search upon. Only documents which contain vectors whose dimensionality match the query_vector can be returned.
.google.datastore.v1.PropertyReference vector_property = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
PropertyReference |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
setDistanceMeasure(FindNearest.DistanceMeasure value)
publicFindNearest.BuildersetDistanceMeasure(FindNearest.DistanceMeasurevalue)Required. The Distance Measure to use, required.
.google.datastore.v1.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
FindNearest.DistanceMeasure The distanceMeasure to set. |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
This builder for chaining. |
setDistanceMeasureValue(int value)
publicFindNearest.BuildersetDistanceMeasureValue(intvalue)Required. The Distance Measure to use, required.
.google.datastore.v1.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 |
FindNearest.Builder |
This builder for chaining. |
setDistanceResultProperty(String value)
publicFindNearest.BuildersetDistanceResultProperty(Stringvalue)Optional. Optional name of the field to output the result of the vector distance calculation. Must conform to entity property limitations.
string distance_result_property = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
String The distanceResultProperty to set. |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
This builder for chaining. |
setDistanceResultPropertyBytes(ByteString value)
publicFindNearest.BuildersetDistanceResultPropertyBytes(ByteStringvalue)Optional. Optional name of the field to output the result of the vector distance calculation. Must conform to entity property limitations.
string distance_result_property = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteString The bytes for distanceResultProperty to set. |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
This builder for chaining. |
setDistanceThreshold(DoubleValue value)
publicFindNearest.BuildersetDistanceThreshold(DoubleValuevalue) Optional. Option to specify a threshold for which no less similar documents
will be returned. The behavior of the specified distance_measure will
affect the meaning of the distance threshold. Since DOT_PRODUCT distances
increase when the vectors are more similar, the comparison is inverted.
For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold For DOT_PRODUCT: WHERE distance >= distance_threshold
.google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
DoubleValue |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
setDistanceThreshold(DoubleValue.Builder builderForValue)
publicFindNearest.BuildersetDistanceThreshold(DoubleValue.BuilderbuilderForValue) Optional. Option to specify a threshold for which no less similar documents
will be returned. The behavior of the specified distance_measure will
affect the meaning of the distance threshold. Since DOT_PRODUCT distances
increase when the vectors are more similar, the comparison is inverted.
For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold For DOT_PRODUCT: WHERE distance >= distance_threshold
.google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
setField(Descriptors.FieldDescriptor field, Object value)
publicFindNearest.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
setLimit(Int32Value value)
publicFindNearest.BuildersetLimit(Int32Valuevalue)Required. The number of nearest neighbors to return. Must be a positive integer of no more than 100.
.google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
Int32Value |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
setLimit(Int32Value.Builder builderForValue)
publicFindNearest.BuildersetLimit(Int32Value.BuilderbuilderForValue)Required. The number of nearest neighbors to return. Must be a positive integer of no more than 100.
.google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
setQueryVector(Value value)
publicFindNearest.BuildersetQueryVector(Valuevalue)Required. The query vector that we are searching on. Must be a vector of no more than 2048 dimensions.
.google.datastore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
Value |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
setQueryVector(Value.Builder builderForValue)
publicFindNearest.BuildersetQueryVector(Value.BuilderbuilderForValue)Required. The query vector that we are searching on. Must be a vector of no more than 2048 dimensions.
.google.datastore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Value.Builder |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
publicFindNearest.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
setUnknownFields(UnknownFieldSet unknownFields)
publicfinalFindNearest.BuildersetUnknownFields(UnknownFieldSetunknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
setVectorProperty(PropertyReference value)
publicFindNearest.BuildersetVectorProperty(PropertyReferencevalue)Required. An indexed vector property to search upon. Only documents which contain vectors whose dimensionality match the query_vector can be returned.
.google.datastore.v1.PropertyReference vector_property = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
PropertyReference |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|
setVectorProperty(PropertyReference.Builder builderForValue)
publicFindNearest.BuildersetVectorProperty(PropertyReference.BuilderbuilderForValue)Required. An indexed vector property to search upon. Only documents which contain vectors whose dimensionality match the query_vector can be returned.
.google.datastore.v1.PropertyReference vector_property = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
PropertyReference.Builder |
| Returns | |
|---|---|
| Type | Description |
FindNearest.Builder |
|