Class VectorTopKProcessor

java.lang.Object
org.apache.cassandra.index.sai.plan.VectorTopKProcessor

public class VectorTopKProcessor extends Object
Processor that scans all rows from given partitions and selects rows with top-k scores based on vector indexes.

This processor performs the following steps: - collect rows with score into PriorityQueue that sorts rows based on score. If there are multiple vector indexes, the final score is the sum of all vector index scores. - remove rows with the lowest scores from PQ if PQ size exceeds limit - return rows from PQ in primary key order to client