OBXHnswBuildLevel class sealed

Build levels define the essential parameters for building the HNSW graph; see obx_model_property_index_hnsw_build_level(). Start with the default L4_Balanced and adjust from there if you want to optimize the graph further. The trade-off is the graph's build time and memory against search quality (recall) and speed. In HNSW terms, this defines the neighbors per node ("M") and the indexing search count ("efConstruction") together. Unlike the search level, this applies when vectors are inserted (indexed); thus, a changed build level requires re-indexing (rebuilding the entire graph, which can be time-consuming). Higher levels pay off on "hard" data only (e.g. GloVe word embeddings), where the default graph limits the recall even at the highest search levels (OBXHnswSearchLevel); on "easy" data, which reaches a high recall already with the default, they cost build time, memory and search speed. The values' comments give the underlying M and efConstruction values (these may change in future versions; existing indexes keep the values they were built with), which you can use as a starting point if you want to optimize them further.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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

Constants

L1_Fastest → const int
M 10 / efConstruction 64: about 0.3-0.6x the build time of L4
L2_VeryFast → const int
M 20 / efConstruction 64
L3_Fast → const int
M 20 / efConstruction 128
L4_Balanced → const int
M 30 / efConstruction 128: the default and a good starting point
L5_BalancedQuality → const int
M 32 / efConstruction 160: recommended if you can afford a longer build time
L6_Quality → const int
M 32 / efConstruction 256: about 1.7-2.8x the build time of L4
L7_QualityHigh → const int
M 48 / efConstruction 192
L8_QualityHigher → const int
M 64 / efConstruction 192
L9_QualityUltra → const int
M 96 / efConstruction 128: about 1.6-3.4x the build time of L4; reaches a recall of 0.99 on hard data
L10_QualityMax → const int
M 96 / efConstruction 256