HnswIndex class

An annotation to create an HSNW index for a field of an Entity class. See HnswIndex.new.

Constructors

HnswIndex({required int dimensions, int? neighborsPerNode, int? indexingSearchCount, HnswFlags? flags, VectorDistanceType? distanceType, double? reparationBacklinkProbability, int? vectorCacheHintSizeKB})
Creates an HNSW index for a field of an Entity class.
const

Properties

dimensions → int
Dimensions of vectors; vector data with fewer dimensions are ignored. Vectors with more dimensions than specified here are only evaluated up to the given dimension value.
final
distanceType → VectorDistanceType?
The distance type used for the HNSW index; if none is given, the default VectorDistanceType.euclidean is used.
final
flags → HnswFlags?
See HnswFlags.new.
final
hashCode → int
The hash code for this object.
no setterinherited
indexingSearchCount → int?
Aka "efConstruction": the number of neighbor searched for while indexing (default: 100).
final
neighborsPerNode → int?
Aka "M": the max number of connections per node (default: 30).
final
reparationBacklinkProbability → double?
When repairing the graph after a node was removed, this gives the probability of adding backlinks to the repaired neighbors.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
vectorCacheHintSizeKB → int?
A non-binding hint at the maximum size of the vector cache in KB (default: 2097152 or 2 GB/GiB).
final

Methods

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

Operators

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