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

Function fuzzy_search

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

Source from the content-addressed store, hash-verified

73
74#[test]
75fn fuzzy_search() {
76 let (idx, _dir) = open_temp();
77 idx.index_document(T, "docs", Surrogate::new(1), "distributed database systems")
78 .unwrap();
79
80 let results = idx.search(T, "docs", "databse", 10, true, None).unwrap();
81 assert!(!results.is_empty());
82 assert!(results[0].fuzzy);
83}
84
85#[test]
86fn remove_document() {

Callers

nothing calls this directly

Calls 3

open_tempFunction · 0.70
index_documentMethod · 0.45
searchMethod · 0.45

Tested by

no test coverage detected