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

Function multiple_docs_same_dim

nodedb/src/engine/vector/sparse/index.rs:276–284  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

274
275 #[test]
276 fn multiple_docs_same_dim() {
277 let mut idx = SparseInvertedIndex::new();
278 idx.insert("doc1", &make_sv(&[(5, 0.3)]));
279 idx.insert("doc2", &make_sv(&[(5, 0.7)]));
280 idx.insert("doc3", &make_sv(&[(5, 0.1)]));
281
282 let postings = idx.get_postings(5).unwrap();
283 assert_eq!(postings.len(), 3);
284 }
285}

Callers

nothing calls this directly

Calls 3

make_svFunction · 0.70
insertMethod · 0.45
get_postingsMethod · 0.45

Tested by

no test coverage detected