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

Function from_ids

nodedb/src/query/bitmap.rs:10–12  ·  view source on GitHub ↗

Build a roaring bitmap from a set of document IDs. Used for pre-filtering during HNSW vector search: the bitmap indicates which document IDs satisfy metadata predicates, so the vector engine can skip non-matching candidates during traversal.

(ids: impl IntoIterator<Item = u32>)

Source from the content-addressed store, hash-verified

8/// which document IDs satisfy metadata predicates, so the vector engine
9/// can skip non-matching candidates during traversal.
10pub fn from_ids(ids: impl IntoIterator<Item = u32>) -> RoaringBitmap {
11 ids.into_iter().collect()
12}
13
14/// Intersect two bitmaps (AND). Used to combine multiple filter predicates.
15pub fn intersect(a: &RoaringBitmap, b: &RoaringBitmap) -> RoaringBitmap {

Callers 5

create_and_checkFunction · 0.85
intersect_filtersFunction · 0.85
union_combinesFunction · 0.85
serialize_roundtripFunction · 0.85
empty_bitmapFunction · 0.85

Calls 1

collectMethod · 0.80

Tested by 5

create_and_checkFunction · 0.68
intersect_filtersFunction · 0.68
union_combinesFunction · 0.68
serialize_roundtripFunction · 0.68
empty_bitmapFunction · 0.68