()
| 53 | |
| 54 | #[test] |
| 55 | fn 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] |
| 75 | fn fuzzy_search() { |
nothing calls this directly
no test coverage detected