MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / merge_top_k

Method merge_top_k

nodedb-cluster/src/distributed_vector/coordinator.rs:95–97  ·  view source on GitHub ↗

Merge all shard results and return the global top-K.

(&mut self, top_k: usize)

Source from the content-addressed store, hash-verified

93
94 /// Merge all shard results and return the global top-K.
95 pub fn merge_top_k(&mut self, top_k: usize) -> Vec<VectorHit> {
96 self.merger.top_k(top_k)
97 }
98
99 /// Number of shards that have responded.
100 pub fn response_count(&self) -> usize {

Callers 1

collect_and_mergeFunction · 0.80

Calls 1

top_kMethod · 0.45

Tested by 1

collect_and_mergeFunction · 0.64