Class VectorIndexSegmentSearcher
java.lang.Object
org.apache.cassandra.index.sai.disk.v1.segment.IndexSegmentSearcher
org.apache.cassandra.index.sai.disk.v1.segment.VectorIndexSegmentSearcher
- All Implemented Interfaces:
Closeable,AutoCloseable,SegmentOrdering
Executes ANN search against a vector graph for an individual index segment.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longorderBy(Expression orderer, AbstractBounds<PartitionPosition> keyRange, QueryContext context) Order the rows by the given expression.orderResultsBy(QueryContext context, List<PrimaryKey> results, Expression orderer) Reorder, limit, and put back into original order the results from a single sstablesearch(Expression expression, AbstractBounds<PartitionPosition> keyRange, QueryContext queryContext) Search on-disk index synchronously.toString()Methods inherited from class org.apache.cassandra.index.sai.disk.v1.segment.IndexSegmentSearcher
open
-
Field Details
-
FORCE_BRUTE_FORCE_ANN
-
-
Method Details
-
indexFileCacheSize
public long indexFileCacheSize()- Specified by:
indexFileCacheSizein classIndexSegmentSearcher- Returns:
- memory usage of underlying on-disk data structure
-
search
public KeyRangeIterator search(Expression expression, AbstractBounds<PartitionPosition> keyRange, QueryContext queryContext) throws IOException Description copied from class:IndexSegmentSearcherSearch on-disk index synchronously.- Specified by:
searchin classIndexSegmentSearcher- Parameters:
expression- to filter on disk indexqueryContext- to track per sstable cache and per query metrics- Returns:
KeyRangeIteratorwith matches for the given expression- Throws:
IOException
-
orderBy
public CloseableIterator<PrimaryKeyWithScore> orderBy(Expression orderer, AbstractBounds<PartitionPosition> keyRange, QueryContext context) throws IOException Description copied from class:IndexSegmentSearcherOrder the rows by the given expression.- Overrides:
orderByin classIndexSegmentSearcher- Parameters:
orderer- the object containing the ordering logickeyRange- key range specific in read command, used by ANN indexcontext- to track per sstable cache and per query metrics- Returns:
- an iterator of
PrimaryKeyWithScorein descending score order - Throws:
IOException
-
orderResultsBy
public CloseableIterator<PrimaryKeyWithScore> orderResultsBy(QueryContext context, List<PrimaryKey> results, Expression orderer) throws IOException Description copied from interface:SegmentOrderingReorder, limit, and put back into original order the results from a single sstable- Throws:
IOException
-
toString
-
close
- Throws:
IOException
-