pub(crate) mod analysis; pub(crate) mod rank; pub(crate) mod retrieve; use crate::{Document, Kind, Media}; #[derive(Clone, Debug)] pub struct Query<'a> { pub text: &'a str, pub kind: Option, pub media: Option, pub offset: usize, pub limit: usize, } impl<'a> Query<'a> { pub fn new(text: &'a str) -> Self { Self { text, kind: None, media: None, offset: 0, limit: 10, } } } #[derive(Debug)] pub struct SearchPage { pub total: usize, pub hits: Vec, }