Skip to navigation

GPUSearchParams

View as Markdown

Java package: com.nvidia.cuvs.lucene

public class GPUSearchParams

Public Members

getWriterThreads

public int getWriterThreads()

Get the cuVS writer threads parameter

Returns

cuVS writer threads parameter

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:115

getIntermediateGraphDegree

public int getIntermediateGraphDegree()

Get the intermediate graph degree

Returns

the graph degree parameter

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:124

getGraphdegree

public int getGraphdegree()

Get the graph degree

Returns

the graph degree parameter

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:133

getCagraGraphBuildAlgo

public CagraGraphBuildAlgo getCagraGraphBuildAlgo()

Get the CAGRA build algorithm parameter value

Returns

the CAGRA build algorithm parameter value

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:142

getIndexType

public IndexType getIndexType()

Get the index type parameter

Returns

the index type parameter

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:151

getCuVSIvfPqParams

public CuVSIvfPqParams getCuVSIvfPqParams()

Get the instance of CuVSIvfPqParams

Returns

an instance of CuVSIvfPqParams

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:160

getStrategy

public Strategy getStrategy()

Get the chosen strategy:

When HEURISTIC [Default] is chosen, the CAGRA build algorithm and its indexing parameters are automatically chosen based on the size of the data set When CUSTOM is chosen, the build algorithm and its parameters (either defaults or overridden values with the use of With* methods) is used internally

Returns

get the chosen Strategy

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:173

getCuvsDistanceType

public CuvsDistanceType getCuvsDistanceType()

Get the cuvs distance type

Returns

the distance type

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:182

getnNDescentNumIterations

public int getnNDescentNumIterations()

get the number of Iterations to run if building with NN_DESCENT

Returns

the number of iterations for NN_DESCENT

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:191

getBuildQuality

public int getBuildQuality()

Get the build quality handed to cuVS’ build heuristic. Only consulted under the Strategy#HEURISTIC strategy.

Returns

the build quality

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:201

withWriterThreads

public Builder withWriterThreads(int writerThreads)

Set the number of cuVS writer threads while building the index Valid range - Minimum: MIN_WRITER_THREADS, Maximum: MAX_WRITER_THREADS Default value - DEFAULT_WRITER_THREADS

Parameters

NameDescription
writerThreadsthe number of cuVS writer threads

Returns

instance of Builder

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:254

withIntermediateGraphDegree

public Builder withIntermediateGraphDegree(int intermediateGraphDegree)

Set the intermediate graph degree to use while building CAGRA index Valid range - Minimum: MIN_INT_GRAPH_DEG, Maximum: MAX_INT_GRAPH_DEG Default value - DEFAULT_INT_GRAPH_DEGREE

Parameters

NameDescription
intermediateGraphDegreethe intermediate graph degree parameter

Returns

instance of Builder

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:267

withGraphDegree

public Builder withGraphDegree(int graphDegree)

Set the graph degree to use while building CAGRA index Valid range - Minimum: MIN_GRAPH_DEG, Maximum: MAX_GRAPH_DEG Default value - DEFAULT_GRAPH_DEGREE

Parameters

NameDescription
graphDegreethe graph degree parameter

Returns

instance of Builder

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:280

withCagraGraphBuildAlgo

public Builder withCagraGraphBuildAlgo(CagraGraphBuildAlgo cagraGraphBuildAlgo)

Set the CAGRA build algorithm. Cannot be null, defaults to NN_DESCENT

Parameters

NameDescription
cagraGraphBuildAlgothe CAGRA build algorithm to use

Returns

instance of Builder

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:292

withIndexType

public Builder withIndexType(IndexType indexType)

Set the type of index to build - CAGRA, BRUTEFORCE, or both. Cannot be null, defaults to CAGRA

Parameters

NameDescription
indexTypethe type of index to build

Returns

instance of Builder

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:304

withCuVSIvfPqParams

public Builder withCuVSIvfPqParams(CuVSIvfPqParams cuVSIvfPqParams)

Set the instance of CuVSIvfPqParams

Parameters

NameDescription
cuVSIvfPqParams

Returns

instance of Builder

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:315

withStrategy

public Builder withStrategy(Strategy strategy)

Set the chosen strategy:

When HEURISTIC [Default] is chosen, the CAGRA build algorithm and its indexing parameters are automatically chosen based on the size of the data set When CUSTOM is chosen, the build algorithm and its parameters (either defaults or overridden values with the use of With* methods) is used internally

Valid options - HEURISTIC, CUSTOM Default value - HEURISTIC

Parameters

NameDescription
strategy, the strategy to choose

Returns

instance of Builder

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:332

withCuvsDistanceType

public Builder withCuvsDistanceType(CuvsDistanceType cuvsDistanceType)

Set the CuvsDistanceType

Parameters

NameDescription
cuvsDistanceTypethe CuvsDistanceType to set

Returns

instance of Builder

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:343

withNNDescentNumIterations

public Builder withNNDescentNumIterations(int nnDescentNumIterations)

Set the number of Iterations to run if building with NN_DESCENT

Valid range - Minimum: MIN_NN_DESCENT_NUM_ITERATIONS, Maximum: MAX_NN_DESCENT_NUM_ITERATIONS Default value - DEFAULT_NN_DESCENT_NUM_ITERATIONS

Parameters

NameDescription
nnDescentNumIterationsnumber of merge workers to set

Returns

instance of Builder

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:357

withBuildQuality

public Builder withBuildQuality(int buildQuality)

Set the build quality cuVS applies when deriving the build algorithm’s parameters. Higher values trade build cost for graph quality.

Only consulted under the Strategy#HEURISTIC strategy.

Valid range - Minimum: MIN_BUILD_QUALITY, unbounded above. cuVS documents any value as valid, with values below 20 being the most practical. Default value - DEFAULT_BUILD_QUALITY

Parameters

NameDescription
buildQualitythe build quality to set

Returns

instance of Builder

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:375

build

public GPUSearchParams build()

Creates and returns an instance of GPUSearchParams

Returns

instance of GPUSearchParams

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:419

Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/GPUSearchParams.java:15