Struct elipdotter::query::Query
source · pub struct Query { /* private fields */ }
Expand description
A query.
This is just a root Part
.
Use parse
to create one.
You can also use the std::str::FromStr
implementation.
Implementations§
source§impl Query
impl Query
pub fn documents<'a, 'b, P: Provider<'a>>( &'b self, provider: &'a P ) -> Documents<'a, 'b, P>
sourcepub fn occurrences<'a>(
&'a self,
provider: &'a impl OccurenceProvider<'a>,
distance_threshold: usize
) -> Result<impl Iterator<Item = Hit> + 'a, IterError>
pub fn occurrences<'a>( &'a self, provider: &'a impl OccurenceProvider<'a>, distance_threshold: usize ) -> Result<impl Iterator<Item = Hit> + 'a, IterError>
The distance_threshold
is the bytes between two occurrences to consider the “same”, which
increases Hit::rating
.
Errors
See Self::documents
.
Panics
Some implementations of index::OccurenceProvider
panic under certain circumstances.
index::SimpleOccurences
, for example, panics if you haven’t supplied all the necessary
documents.