()
| 84 | |
| 85 | #[test] |
| 86 | fn remove_document() { |
| 87 | let (idx, _dir) = open_temp(); |
| 88 | idx.index_document(T, "docs", Surrogate::new(1), "hello world") |
| 89 | .unwrap(); |
| 90 | idx.index_document(T, "docs", Surrogate::new(2), "hello rust") |
| 91 | .unwrap(); |
| 92 | |
| 93 | idx.remove_document(T, "docs", Surrogate::new(1)).unwrap(); |
| 94 | |
| 95 | let results = idx.search(T, "docs", "hello", 10, false, None).unwrap(); |
| 96 | assert_eq!(results.len(), 1); |
| 97 | assert_eq!(results[0].doc_id, Surrogate::new(2)); |
| 98 | } |
| 99 | |
| 100 | #[test] |
| 101 | fn empty_query() { |
nothing calls this directly
no test coverage detected