CuVS2510GPUVectorsReader
Java package: com.nvidia.cuvs.lucene
KnnVectorsReader instance associated with cuVS format for reading vectors from an index.
Public Members
CuVS2510GPUVectorsReader
Initializes the CuVS2510GPUVectorsReader, checks and loads the index.
Parameters
Throws
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:99
CuVS2510GPUVectorsReader
Initializes the reader with the cache owned by its vectors format.
Parameters
Throws
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:112
readSimilarityFunction
Checks the distance function validity and returns it.
Parameters
Returns
an instance of VectorSimilarityFunction
Throws
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:238
readVectorEncoding
Reads the vector encoding (The numeric data type of the vector values) from the DataInput.
Parameters
Returns
the vector encoding
Throws
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:253
getFieldEntry
Gets the FieldEntry for the given field name, or null when this segment holds no
cuVS index for it.
Parameters
Returns
the meta information for the field, or null
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:316
openCagraIndexForMerge
Deserializes the CAGRA index of a single field onto the GPU, bypassing the GPUIndex
cache. This is how CuVS2510GPUVectorsWriter obtains the inputs for the cuVS merge API:
a reader opened with Context#MERGE caches no indexes until it is first searched, and
a cached index belongs to the com.nvidia.cuvs.CuVSResources of whichever thread opened
the reader (or first searched it, for a merge-opened reader), while the merge API requires
every input to share one resources instance - the merging thread’s.
The returned index is owned by the caller and must be closed by it.
Parameters
Returns
a freshly loaded CAGRA index, or null if this segment has none for the field
Throws
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:335
lazilyLoadedIndexCount
Returns the number of indexes a merge-opened reader has loaded so far. Package-private so that tests can check that loading is per field.
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:412
close
Closes the resources.
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:453
checkIntegrity
Checks consistency of this reader.
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:483
getFloatVectorValues
Returns the FloatVectorValues for the given field.
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:492
getByteVectorValues
Returns the ByteVectorValues for the given field.
This is not supported.
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:502
search
Returns the k nearest neighbor documents using cuVS’s CAGRA or brute force algorithm for this field, to the given vector.
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:526
search
Return the k nearest neighbor documents as determined by comparison of their vector values for this field, to the given vector.
This is not supported.
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:687
readEntry
Returns an instance of FieldEntry.
Parameters
Returns
an instance of FieldEntry
Throws
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:715
getCagraIndexForField
Returns the CagraIndex for the given field, or null if this segment has none
(e.g., when the field is missing or the segment only holds a brute force index).
If this reader was opened for a merge and has not been searched on this field yet, this loads the field’s index onto the GPU first. The index is owned by this reader, which closes it, so callers must not close it.
Parameters
Returns
the CAGRA index, or null
Throws
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:772
getFilterBitsetCache
Returns the filter cache owned by the vectors format that created this reader.
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:781
getFieldInfos
Gets the instance of FieldInfos.
Returns
the instance of FieldInfos
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:790
getCuvsIndexes
Gets the map of GPUIndex objects.
Returns
the map of GPU index objects, or null if this reader was opened for a merge
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:799
getFieldEntries
Gets the map of FieldEntry objects that hold the meta information for the field.
Returns
the map of FieldEntry objects
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:808
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/CuVS2510GPUVectorsReader.java:62