%SQL.VectorIndex.HNSWIndexer
class %SQL.VectorIndex.HNSWIndexer extends %SQL.VectorIndex.KNNIndexer
Hierarchical Navigable Small World (HNSW), implemented based on https://arxiv.org/abs/1603.09320Property Inventory
Method Inventory
Parameters
parameter LatestVersion = 2;
Latest graph storage version number
Properties
property M as %Integer (MINVAL = 1);
The number of bi-directional links created for every new element during construction
Property methods: MDisplayToLogical(), MGet(), MIsValid(), MLogicalToDisplay(), MNormalize(), MSet()
property efConstruction as %Integer (MINVAL = 2);
Property methods: efConstructionDisplayToLogical(), efConstructionGet(), efConstructionIsValid(), efConstructionLogicalToDisplay(), efConstructionNormalize(), efConstructionSet()
property efSearch as %Integer (MINVAL = 1);
Property methods: efSearchDisplayToLogical(), efSearchGet(), efSearchIsValid(), efSearchLogicalToDisplay(), efSearchNormalize(), efSearchSet()
property mL as %Double (MINVAL = 0);
A parameter that controls the number of layers in this graph
Property methods: mLDisplayToLogical(), mLGet(), mLIsValid(), mLLogicalToDisplay(), mLNormalize(), mLOdbcToLogical(), mLSet()
Methods
method %OnNew(ClassName, IndexName, Distance, IndexProperty, DIM, IndexData) as %Status
Inherited description: This callback method is invoked by the %New() method to
provide notification that a new instance of an object is being created.
If this method returns an error then the object will not be created.
It is passed the arguments provided in the %New call. When customizing this method, override the arguments with whatever variables and types you expect to receive from %New(). For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:
Method %OnNew(dob as %Date = "", name as %Name = "") as %Status If instead of returning a %Status code this returns an oref and this oref is a subclass of the current class then this oref will be the one returned to the caller of %New method.
classmethod HNSWrandomLevel(mL)
Return a random positive integer based on the probability distribution described in the HNSW paper (https://arxiv.org/abs/1603.09320).
Parameter:
mL: controls the shape of the distribution. A larger mL results in more layers in the graph
method SetUpPartitionKeys(ByRef pID)
method getNext(ByRef distance, ByRef id) as %Boolean
Returns by reference the next nearest neighbor to i%Point and the distance between this neighbor to i%Point
If the table is partitioned, this function expect these two properties being defined: i%PartitionKeys=$lb(partKey1,...,partKeyN) and %BucketID. In this case the returned id is the pRowID of the next nearest neighbor.
Inherited Members
Inherited Properties
- BaseDataLocation
- BaseGraphLocation
- BasePropertyGlb
- BucketID
- CachedQueryOrefId
- ClassName
- Data
- DataLocation
- Dim
- Distance
- FilterMethodName
- GraphLocation
- IndexGlobalLocation
- IndexName
- IsIndexPartitioned
- IsTablePartitioned
- K
- OffSet
- PartitionKeys
- Point
- Property
- PropertyGlb
- PropertyGlbListIdx
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- Delete()
- Initialize()
- Insert()
- Purge()
- TopK()
- Update()