[−][src]Struct tantivy::termdict::TermDictionary
The term dictionary contains all of the terms in
tantivy index
in a sorted manner.
The Fst
crate is used to associate terms to their
respective TermOrdinal
. The TermInfoStore
then makes it
possible to fetch the associated TermInfo
.
Methods
impl TermDictionary
[src]
pub fn from_source(source: &ReadOnlySource) -> Self
[src]
Opens a TermDictionary
given a data source.
pub fn empty(field_type: &FieldType) -> Self
[src]
Creates an empty term dictionary which contains no terms.
pub fn num_terms(&self) -> usize
[src]
Returns the number of terms in the dictionary.
Term ordinals range from 0 to num_terms() - 1
.
pub fn term_ord<K: AsRef<[u8]>>(&self, key: K) -> Option<TermOrdinal>
[src]
Returns the ordinal associated to a given term.
pub fn ord_to_term(&self, ord: TermOrdinal, bytes: &mut Vec<u8>) -> bool
[src]
Returns the term associated to a given term ordinal.
Term ordinals are defined as the position of the term in the sorted list of terms.
Returns true iff the term has been found.
Regardless of whether the term is found or not, the buffer may be modified.
pub fn term_info_from_ord(&self, term_ord: TermOrdinal) -> TermInfo
[src]
Returns the number of terms in the dictionary.
pub fn get<K: AsRef<[u8]>>(&self, key: K) -> Option<TermInfo>
[src]
Lookups the value corresponding to the key.
pub fn range(&self) -> TermStreamerBuilder
[src]
Returns a range builder, to stream all of the terms within an interval.
pub fn stream(&self) -> TermStreamer
[src]
A stream of all the sorted terms. See also .stream_field()
pub fn search<'a, A: Automaton + 'a>(
&'a self,
automaton: A
) -> TermStreamerBuilder<'a, A>
[src]
&'a self,
automaton: A
) -> TermStreamerBuilder<'a, A>
Returns a search builder, to stream all of the terms within the Automaton
Auto Trait Implementations
impl Send for TermDictionary
impl Sync for TermDictionary
impl Unpin for TermDictionary
impl !UnwindSafe for TermDictionary
impl !RefUnwindSafe for TermDictionary
Blanket Implementations
impl<T> Fruit for T where
T: Send + Downcast,
[src]
T: Send + Downcast,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,