Rate This Document
Findability
Accuracy
Completeness
Readability

API Description

KScaNN does not provide external interfaces but makes intrusive modifications to the open source ScaNN algorithm, including interface additions to the core ScaNN class ScannInterface. To achieve the optimal performance, KScaNN interfaces do not verify all input parameters. The validity of input parameters is ensured by the service that calls the interfaces, which are described in Table 1.

Table 1 Table Modified ScannInterface methods of KScaNN

API

Function

SetNumThreads

Configures the number of threads for search operations (KScaNN-specific API).

SearchAdditionalParams

Extends ScaNN functionality with custom search parameters (KScaNN-specific API).

Search

Single-query search (single-thread behavior consistent with the open source algorithm).

SearchBatched

Batch query search (single-thread behavior consistent with the open source algorithm).

SearchBatchedParallel

Parallel batch query search (multi-thread behavior consistent with the open source algorithm).

Initialize

Index construction (consistent with the open source algorithm).

SerializeToMemory

Serializes the index into memory (KScaNN-specific addition).

LoadFromMemory

Restore the index instance from memory (KScaNN-specific API).

GetNum

Obtains the number of vectors in the base library (KScaNN-specific addition).

GetDim

Obtains the dimensions of vectors in the base library (KScaNN-specific API).