pub struct DocumentIndex { /* private fields */ }Expand description
Index for efficient document queries.
Implementations§
Source§impl DocumentIndex
impl DocumentIndex
Sourcepub fn index_type(&self) -> IndexType
pub fn index_type(&self) -> IndexType
Get the index type.
Sourcepub fn index_document(&mut self, doc: &Document)
pub fn index_document(&mut self, doc: &Document)
Index a document.
Sourcepub fn unindex_document(&mut self, doc: &Document)
pub fn unindex_document(&mut self, doc: &Document)
Remove a document from the index.
Sourcepub fn find_eq(&self, value: &Value) -> Vec<DocumentId>
pub fn find_eq(&self, value: &Value) -> Vec<DocumentId>
Find documents by exact value.
Sourcepub fn search(&self, query: &str) -> Vec<DocumentId>
pub fn search(&self, query: &str) -> Vec<DocumentId>
Search full-text index.
Auto Trait Implementations§
impl Freeze for DocumentIndex
impl RefUnwindSafe for DocumentIndex
impl Send for DocumentIndex
impl Sync for DocumentIndex
impl Unpin for DocumentIndex
impl UnsafeUnpin for DocumentIndex
impl UnwindSafe for DocumentIndex
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