Trait kite::store::IndexReader
[−]
[src]
pub trait IndexReader<'a> { type AllDocRefIterator: DocRefIterator<'a>; type TermDocRefIterator: DocRefIterator<'a>; fn schema(&self) -> &Schema; 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_all_docs(&'a self) -> Self::AllDocRefIterator; fn iter_docs_with_term(&'a self,
term: &[u8],
field_ref: &FieldRef)
-> Option<Self::TermDocRefIterator>; fn iter_all_terms(&'a self,
field_ref: &FieldRef)
-> Option<Box<Iterator<Item=&'a [u8]> + 'a>>; fn num_docs_with_term(&'a self, term: &[u8], field_ref: &FieldRef) -> u64; fn total_tokens(&'a self, field_ref: &FieldRef) -> u64; }
Associated Types
type AllDocRefIterator: DocRefIterator<'a>
type TermDocRefIterator: DocRefIterator<'a>
Required Methods
fn schema(&self) -> &Schema
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_all_docs(&'a self) -> Self::AllDocRefIterator
fn iter_docs_with_term(&'a self,
term: &[u8],
field_ref: &FieldRef)
-> Option<Self::TermDocRefIterator>
term: &[u8],
field_ref: &FieldRef)
-> Option<Self::TermDocRefIterator>
fn iter_all_terms(&'a self,
field_ref: &FieldRef)
-> Option<Box<Iterator<Item=&'a [u8]> + 'a>>
field_ref: &FieldRef)
-> Option<Box<Iterator<Item=&'a [u8]> + 'a>>
fn num_docs_with_term(&'a self, term: &[u8], field_ref: &FieldRef) -> u64
fn total_tokens(&'a self, field_ref: &FieldRef) -> u64
Implementors
impl<'a> IndexReader<'a> for MemoryIndexStoreReader<'a>