StructuredQuery_FindNearest class final

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

Constructors

StructuredQuery_FindNearest({required StructuredQuery_FieldReference? vectorField, required Value? queryVector, required StructuredQuery_FindNearest_DistanceMeasure distanceMeasure, required Int32Value? limit, String distanceResultField = '', DoubleValue? distanceThreshold})
StructuredQuery_FindNearest.fromJson(Object? j)
factory

Properties

distanceMeasure → StructuredQuery_FindNearest_DistanceMeasure
Required. The distance measure to use, required.
final
distanceResultField → String
Optional. Optional name of the field to output the result of the vector distance calculation. Must conform to google.firestore.v1.Document.fields limitations.
final
distanceThreshold → DoubleValue?
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.
final
hashCode → int
The hash code for this object.
no setterinherited
limit → Int32Value?
Required. The number of nearest neighbors to return. Must be a positive integer of no more than 1000.
final
qualifiedName → String
The fully qualified name of this message, i.e., google.protobuf.Duration or google.rpc.ErrorInfo.
finalinherited
queryVector → Value?
Required. The query vector that we are searching on. Must be a vector of no more than 2048 dimensions.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
vectorField → StructuredQuery_FieldReference?
Required. An indexed vector field to search upon. Only documents which contain vectors whose dimensionality match the query_vector can be returned.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Object
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

fullyQualifiedName → const String