1pub mod content;
2pub mod path;
3
4use std::ops::Range;
5use uuid::Uuid;
6
7pub use content::ContentSearcher;
8pub use path::PathSearcher;
9
10#[derive(Debug, Clone, Default)]
12pub struct SearchResult {
13 pub id: Uuid,
14 pub filename: String,
15 pub parent_path: String,
16 pub path_indices: Vec<u32>,
18 pub path_matches: Vec<ContentMatch>,
19 pub content_matches: Vec<ContentMatch>,
21}
22
23#[derive(Debug, Clone)]
25pub struct ContentMatch {
26 pub range: Range<usize>,
28 pub exact: bool,
30}
31
32use crate::Lb;
33
34impl Lb {
35 pub async fn path_searcher(&self) -> PathSearcher {
36 PathSearcher::new(self).await
37 }
38}