Skip to navigation

CagraIndexParamsFactory

View as Markdown

Java package: com.nvidia.cuvs.lucene

public class CagraIndexParamsFactory

A centralized place for producing CagraIndexParams from the cuvs-lucene input parameter classes based on the chosen strategy.

For the HEURISTIC strategy the build heuristics are delegated to cuVS.

Public Members

create

public static CagraIndexParams create( GPUSearchParams gpuSearchParams, long rows, long dimension)

Creates an instance of CagraIndexParams for the GPU-native CAGRA index based on the chosen strategy in the GPUSearchParams.

Parameters

NameDescription
gpuSearchParamsthe input parameters for the build and search on the GPU API
rowsnumber of vectors in the data set
dimensionthe dimension of the vectors in the data set

Returns

an instance of CagraIndexParams

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CagraIndexParamsFactory.java:29

create

public static CagraIndexParams create( AcceleratedHNSWParams acceleratedHNSWParams, long rows, long dimension)

Creates an instance of CagraIndexParams for the accelerated-HNSW index based on the chosen strategy in the AcceleratedHNSWParams.

Parameters

NameDescription
acceleratedHNSWParamsthe input parameters for the build on the GPU API
rowsnumber of vectors in the data set
dimensionthe dimension of the vectors in the data set

Returns

an instance of CagraIndexParams

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CagraIndexParamsFactory.java:73

withMaxGraphDegree

static CagraIndexParams withMaxGraphDegree(CagraIndexParams params, long maxGraphDegree)

Returns params with the graph degree lowered to maxGraphDegree, or the same params if its graph degree is not larger. The intermediate graph degree is kept, so it stays at least the graph degree, as CAGRA requires.

Parameters

NameDescription
paramsthe parameters to copy
maxGraphDegreethe largest graph degree to build

Returns

parameters whose graph degree is at most maxGraphDegree

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CagraIndexParamsFactory.java:119

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CagraIndexParamsFactory.java:17