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

Function search_with_stemming

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

Source from the content-addressed store, hash-verified

53
54#[test]
55fn search_with_stemming() {
56 let (idx, _dir) = open_temp();
57 idx.index_document(
58 T,
59 "docs",
60 Surrogate::new(1),
61 "running distributed databases",
62 )
63 .unwrap();
64 idx.index_document(T, "docs", Surrogate::new(2), "the cat sat on a mat")
65 .unwrap();
66
67 let results = idx
68 .search(T, "docs", "database distribution", 10, false, None)
69 .unwrap();
70 assert!(!results.is_empty());
71 assert_eq!(results[0].doc_id, Surrogate::new(1));
72}
73
74#[test]
75fn fuzzy_search() {

Callers

nothing calls this directly

Calls 3

open_tempFunction · 0.70
index_documentMethod · 0.45
searchMethod · 0.45

Tested by

no test coverage detected