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

Function open_temp

nodedb/src/engine/sparse/inverted/tests.rs:16–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14const T: TenantId = TenantId::new(1);
15
16fn open_temp() -> (InvertedIndex, tempfile::TempDir) {
17 let dir = tempfile::tempdir().unwrap();
18 let path = dir.path().join("test-inverted.redb");
19 let db = Arc::new(Database::create(&path).unwrap());
20 let idx = InvertedIndex::open(db).unwrap();
21 (idx, dir)
22}
23
24#[test]
25fn index_and_search() {

Callers 7

index_and_searchFunction · 0.70
search_with_stemmingFunction · 0.70
fuzzy_searchFunction · 0.70
remove_documentFunction · 0.70
empty_queryFunction · 0.70
collections_isolatedFunction · 0.70

Calls 4

joinMethod · 0.80
createFunction · 0.50
openFunction · 0.50
pathMethod · 0.45

Tested by

no test coverage detected