Interface FindNearestOrBuilder (2.27.1)

publicinterface FindNearestOrBuilderextendsMessageOrBuilder

Implements

MessageOrBuilder

Methods

getDistanceMeasure()

publicabstractFindNearest.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()

publicabstractintgetDistanceMeasureValue()

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()

publicabstractStringgetDistanceResultProperty()

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()

publicabstractByteStringgetDistanceResultPropertyBytes()

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()

publicabstractDoubleValuegetDistanceThreshold()

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.

getDistanceThresholdOrBuilder()

publicabstractDoubleValueOrBuildergetDistanceThresholdOrBuilder()

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()

publicabstractInt32ValuegetLimit()

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.

getLimitOrBuilder()

publicabstractInt32ValueOrBuildergetLimitOrBuilder()

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()

publicabstractValuegetQueryVector()

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.

getQueryVectorOrBuilder()

publicabstractValueOrBuildergetQueryVectorOrBuilder()

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()

publicabstractPropertyReferencegetVectorProperty()

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.

getVectorPropertyOrBuilder()

publicabstractPropertyReferenceOrBuildergetVectorPropertyOrBuilder()

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()

publicabstractbooleanhasDistanceThreshold()

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()

publicabstractbooleanhasLimit()

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()

publicabstractbooleanhasQueryVector()

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()

publicabstractbooleanhasVectorProperty()

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.

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年11月19日 UTC.