Class DiskAnn
java.lang.Object
org.apache.cassandra.index.sai.disk.v1.vector.DiskAnn
- All Implemented Interfaces:
AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionDiskAnn(SegmentMetadata.ComponentMetadataMap componentMetadatas, PerColumnIndexFiles indexFiles, IndexWriterConfig config, SSTableId sstableId) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()io.github.jbellis.jvector.graph.NeighborSimilarity.ApproximateScoreFunctiongetApproximateScoreFunction(float[] queryVector) io.github.jbellis.jvector.pq.CompressedVectorsio.github.jbellis.jvector.graph.NeighborSimilarity.ExactScoreFunctiongetExactScoreFunction(float[] queryVector, io.github.jbellis.jvector.graph.GraphIndex.View<float[]> view) io.github.jbellis.jvector.graph.GraphIndex.View<float[]>getView()Get the graph view, callers must close the view.longsearch(float[] queryVector, int topK, int limit, io.github.jbellis.jvector.util.Bits acceptBits, IntConsumer nodesVisitedConsumer) intsize()
-
Constructor Details
-
DiskAnn
public DiskAnn(SegmentMetadata.ComponentMetadataMap componentMetadatas, PerColumnIndexFiles indexFiles, IndexWriterConfig config, SSTableId sstableId) throws IOException - Throws:
IOException
-
-
Method Details
-
ramBytesUsed
public long ramBytesUsed() -
size
public int size() -
getCompressedVectors
public io.github.jbellis.jvector.pq.CompressedVectors getCompressedVectors() -
search
public CloseableIterator<RowIdWithScore> search(float[] queryVector, int topK, int limit, io.github.jbellis.jvector.util.Bits acceptBits, IntConsumer nodesVisitedConsumer) - Returns:
- Row IDs associated with the topK vectors near the query
-
getApproximateScoreFunction
public io.github.jbellis.jvector.graph.NeighborSimilarity.ApproximateScoreFunction getApproximateScoreFunction(float[] queryVector) -
getExactScoreFunction
public io.github.jbellis.jvector.graph.NeighborSimilarity.ExactScoreFunction getExactScoreFunction(float[] queryVector, io.github.jbellis.jvector.graph.GraphIndex.View<float[]> view) -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
getOrdinalsView
-
getView
public io.github.jbellis.jvector.graph.GraphIndex.View<float[]> getView()Get the graph view, callers must close the view.- Returns:
-