pub struct SearchDocsDb { /* private fields */ }Expand description
FTS index for document/resource chunks (separate from symbol FTS).
Implementations§
Source§impl SearchDocsDb
impl SearchDocsDb
pub fn open(db_path: &Path) -> Result<Self>
Sourcepub fn rebuild(&self, docs: &[SearchDoc]) -> Result<()>
pub fn rebuild(&self, docs: &[SearchDoc]) -> Result<()>
Atomically replace all document chunks.
pub fn count(&self) -> Result<i64>
Sourcepub fn search(
&self,
tokens: &[String],
limit: usize,
kinds: Option<&[&str]>,
) -> Result<Vec<DocHit>>
pub fn search( &self, tokens: &[String], limit: usize, kinds: Option<&[&str]>, ) -> Result<Vec<DocHit>>
Full-text search over document chunks. Returns up to limit hits ranked by BM25.
pub fn is_empty(&self) -> bool
Auto Trait Implementations§
impl !Freeze for SearchDocsDb
impl !RefUnwindSafe for SearchDocsDb
impl !Sync for SearchDocsDb
impl !UnwindSafe for SearchDocsDb
impl Send for SearchDocsDb
impl Unpin for SearchDocsDb
impl UnsafeUnpin for SearchDocsDb
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