The metric space to create for the index ('l2', 'ip', or 'cosine').
The dimesionality of metric space.
adds a datum point to the search index.
The datum point to be added to the search index.
The index of the datum point to be added.
Optional
replaceDeleted: booleanThe flag to replace a deleted element (default: false).
Optional
Initialize index.
The maximum number of elements.
Optional
m: numberThe maximum number of outgoing connections on the graph (default: 16).
Optional
Optional
efConstruction: numberThe parameter that controls speed/accuracy trade-off during the index construction (default: 200).
Optional
Optional
randomSeed: numberThe seed value of random number generator (default: 100).
Optional
Optional
allowReplaceDeleted: booleanThe flag to replace deleted element when adding new element (default: false).
Optional
Initialize index.
Optional
allowOptional
efOptional
m?: numberOptional
randomreturns numNeighbors
closest items for a given query point.
The query point vector.
The number of nearest neighbors to search for.
Optional
filter: FilterFunctionThe function filters elements by its labels.
Optional
The search result object consists of distances and indices of the nearest neighbors found.
Generated using TypeDoc
Approximate nearest-neighbor search index object based on Hierarchical navigable small world graphs.