HnswIndex
Java package: com.nvidia.cuvs
HnswIndex encapsulates a HNSW index, along with methods to interact
with it.
Public Members
close
Invokes the native destroy_hnsw_index to de-allocate the HNSW index
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswIndex.java:21
search
Invokes the native search_hnsw_index via the Panama API for searching a HNSW index.
Parameters
Returns
an instance of SearchResults containing the results
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswIndex.java:32
newBuilder
Creates a new Builder with an instance of CuVSResources.
Parameters
Throws
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswIndex.java:40
fromCagra
Creates an HNSW index from an existing CAGRA index.
Parameters
Returns
A new HNSW index
Throws
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswIndex.java:53
build
Builds an HNSW index using the ACE (Augmented Core Extraction) algorithm.
ACE enables building HNSW indexes for datasets too large to fit in GPU memory by partitioning the dataset and building sub-indexes for each partition independently.
NOTE: This method requires hnswParams.getAceParams() to be set with
an instance of HnswAceParams.
Parameters
Returns
A new HNSW index ready for search
Throws
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswIndex.java:75
from
Sets an instance of InputStream typically used when index deserialization is needed.
Parameters
Returns
an instance of this Builder
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswIndex.java:96
withIndexParams
Registers an instance of configured HnswIndexParams with this
Builder.
Parameters
Returns
An instance of this Builder.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswIndex.java:105
build
Builds and returns an instance of CagraIndex.
Returns
an instance of CagraIndex
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswIndex.java:112
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswIndex.java:17