TieredIndexQuery
Java package: com.nvidia.cuvs
TieredIndexQuery holds the search parameters and query vectors to be used while invoking search. Currently only supports CAGRA index type.
Thread Safety: Each TieredIndexQuery instance should use its own CuVSResources object that is not shared with other threads. Sharing CuVSResources between threads can lead to memory allocation errors or JVM crashes.
Public Members
getIndexType
Gets the index type for this query.
Returns
the TieredIndexType
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:57
getCagraSearchParameters
Gets the instance of CagraSearchParams initially set.
Returns
an instance CagraSearchParams
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:66
getQueryVectors
Gets the query vector 2D float array.
Returns
2D float array
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:75
getMapping
Gets the passed map instance.
Returns
a map of ID mappings
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:84
getTopK
Gets the topK value.
Returns
the topK value
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:93
getPrefilter
Gets the prefilter BitSet.
Returns
a BitSet object representing the prefilter
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:102
getNumDocs
Gets the number of documents in this index, as used for prefilter.
Returns
number of documents as an integer
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:111
getResources
Gets the CuVSResources instance for this query.
Returns
the CuVSResources instance
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:120
newBuilder
Creates a new Builder instance.
Parameters
Returns
a new Builder instance
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:145
Builder
Constructor that requires CuVSResources.
Important: The provided CuVSResources instance should not be shared with other threads. Each thread performing searches should create its own CuVSResources instance to avoid memory allocation conflicts and potential JVM crashes.
Parameters
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:171
withIndexType
Sets the index type for this query.
Parameters
Returns
an instance of this Builder
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:181
withSearchParams
Sets the instance of configured CagraSearchParams to be passed for search.
Parameters
Returns
an instance of this Builder
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:193
withQueryVectors
Registers the query vectors to be passed in the search call.
Parameters
Returns
an instance of this Builder
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:204
withMapping
Sets the instance of mapping to be used for ID mapping.
Parameters
Returns
an instance of this Builder
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:215
withTopK
Registers the topK value.
Parameters
Returns
an instance of this Builder
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:226
withPrefilter
Sets a BitSet to use as prefilter while searching.
Parameters
Returns
an instance of this Builder
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:239
build
Builds an instance of TieredIndexQuery.
Returns
an instance of TieredIndexQuery
Throws
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:251
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/TieredIndexQuery.java:23