Trait abra::store::IndexReader
[−]
[src]
pub trait IndexReader<'a> { type AllDocRefIterator: DocRefIterator<'a>; type TermDocRefIterator: DocRefIterator<'a>; fn get_document_by_key(&self, doc_key: &str) -> Option<&Document>; fn get_document_by_id(&self, doc_id: &u64) -> Option<&Document>; fn contains_document_key(&self, doc_key: &str) -> bool; fn num_docs(&self) -> usize; fn iter_docids_all(&'a self) -> Self::AllDocRefIterator; fn iter_docids_with_term(
&'a self,
term: &[u8],
field_name: &str
) -> Option<Self::TermDocRefIterator>; fn iter_terms(
&'a self,
field_name: &str
) -> Option<Box<Iterator<Item = &'a [u8]> + 'a>>; fn term_doc_freq(&'a self, term: &[u8], field_name: &str) -> u64; fn total_tokens(&'a self, field_name: &str) -> u64; }
Associated Types
type AllDocRefIterator: DocRefIterator<'a>
type TermDocRefIterator: DocRefIterator<'a>
Required Methods
fn get_document_by_key(&self, doc_key: &str) -> Option<&Document>
fn get_document_by_id(&self, doc_id: &u64) -> Option<&Document>
fn contains_document_key(&self, doc_key: &str) -> bool
fn num_docs(&self) -> usize
fn iter_docids_all(&'a self) -> Self::AllDocRefIterator
fn iter_docids_with_term(
&'a self,
term: &[u8],
field_name: &str
) -> Option<Self::TermDocRefIterator>
&'a self,
term: &[u8],
field_name: &str
) -> Option<Self::TermDocRefIterator>
fn iter_terms(
&'a self,
field_name: &str
) -> Option<Box<Iterator<Item = &'a [u8]> + 'a>>
&'a self,
field_name: &str
) -> Option<Box<Iterator<Item = &'a [u8]> + 'a>>
fn term_doc_freq(&'a self, term: &[u8], field_name: &str) -> u64
fn total_tokens(&'a self, field_name: &str) -> u64
Implementors
impl<'a> IndexReader<'a> for MemoryIndexStoreReader<'a>