FindNearest class
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
- FindNearest.new({String? distanceMeasure, String? distanceResultField, double? distanceThreshold, int? limit, Value? queryVector, FieldReference? vectorField})
- FindNearest.fromJson(Map json_)
Properties
- distanceMeasure ↔ String?
-
The distance measure to use, required.
getter/setter pair
- distanceResultField ↔ String?
-
Optional name of the field to output the result of the vector distance
calculation.
getter/setter pair
- distanceThreshold ↔ double?
-
Option to specify a threshold for which no less similar documents will be
returned.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- limit ↔ int?
-
The number of nearest neighbors to return.
getter/setter pair
- queryVector ↔ Value?
-
The query vector that we are searching on.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- vectorField ↔ FieldReference?
-
An indexed vector field to search upon.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited