pub struct UrlIndexer { /* private fields */ }Expand description
Fetches URLs, converts HTML to markdown, chunks by headings, and indexes into SQLite FTS5 for BM25-ranked section search.
Implementations§
Source§impl UrlIndexer
impl UrlIndexer
Sourcepub fn from_connection(conn: Connection, ttl: Duration) -> Result<Self>
pub fn from_connection(conn: Connection, ttl: Duration) -> Result<Self>
Create a UrlIndexer from an existing connection (e.g. shared with
SessionStore). Applies the URL-specific schema tables.
Sourcepub fn fetch_and_index(
&self,
url: &str,
force: bool,
fetcher: &dyn ContentFetcher,
) -> Result<IndexResult>
pub fn fetch_and_index( &self, url: &str, force: bool, fetcher: &dyn ContentFetcher, ) -> Result<IndexResult>
Fetch a URL via the provided fetcher, convert HTML to markdown,
chunk by headings, and index into FTS5.
- If the URL was fetched within the TTL window and
forceis false, the cached version is used (no fetch). - If
forceis true, the cache is bypassed and the URL is re-fetched.
Auto Trait Implementations§
impl !Freeze for UrlIndexer
impl !RefUnwindSafe for UrlIndexer
impl !Sync for UrlIndexer
impl !UnwindSafe for UrlIndexer
impl Send for UrlIndexer
impl Unpin for UrlIndexer
impl UnsafeUnpin for UrlIndexer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more