pub struct Query(/* private fields */);
Expand description
A parsed query, ready for use in a search
Implementations§
Source§impl Query
impl Query
Sourcepub fn combine(op: Operator, a: impl AsRef<Query>, b: impl AsRef<Query>) -> Self
pub fn combine(op: Operator, a: impl AsRef<Query>, b: impl AsRef<Query>) -> Self
Construct a Query
by combining two others with the specified Operator
Sourcepub fn combine_terms(
op: Operator,
a: impl AsRef<str>,
b: impl AsRef<str>,
) -> Self
pub fn combine_terms( op: Operator, a: impl AsRef<str>, b: impl AsRef<str>, ) -> Self
Construct a Query
by combining two terms with the specified Operator
Sourcepub fn match_nothing() -> Self
pub fn match_nothing() -> Self
Construct a Query
that matches no documents
Sourcepub fn scale(factor: f64, subquery: impl AsRef<Query>) -> Self
pub fn scale(factor: f64, subquery: impl AsRef<Query>) -> Self
Scale the weight of the specified Query
using the given factor
Sourcepub fn term(
term: impl AsRef<str>,
wqf: impl Into<Option<u32>>,
pos: impl Into<Option<u32>>,
) -> Self
pub fn term( term: impl AsRef<str>, wqf: impl Into<Option<u32>>, pos: impl Into<Option<u32>>, ) -> Self
Construct a Query
for the given term
Sourcepub fn value_ge(slot: impl Into<Slot>, lower: impl ToCxxString) -> Self
pub fn value_ge(slot: impl Into<Slot>, lower: impl ToCxxString) -> Self
Construct a query for a single-ended value range
Sourcepub fn value_le(slot: impl Into<Slot>, upper: impl ToCxxString) -> Self
pub fn value_le(slot: impl Into<Slot>, upper: impl ToCxxString) -> Self
Construct a query for a single-ended value range
Sourcepub fn value_range(
slot: impl Into<Slot>,
lower: impl ToCxxString,
upper: impl ToCxxString,
) -> Self
pub fn value_range( slot: impl Into<Slot>, lower: impl ToCxxString, upper: impl ToCxxString, ) -> Self
Construct a Query
for a value range
Sourcepub fn wildcard(
pattern: impl AsRef<str>,
max_expansion: impl Into<Option<u32>>,
limit_behavior: impl Into<Option<WildcardLimitBehavior>>,
combiner: impl Into<Option<WildcardCombiner>>,
) -> Self
pub fn wildcard( pattern: impl AsRef<str>, max_expansion: impl Into<Option<u32>>, limit_behavior: impl Into<Option<WildcardLimitBehavior>>, combiner: impl Into<Option<WildcardCombiner>>, ) -> Self
Construct a Query
for a wildcard queries
Sourcepub fn is_invalid(&self) -> bool
pub fn is_invalid(&self) -> bool
Returns true
if this Query
is invalid
Sourcepub fn subqueries(&self) -> SubqueryIter<'_>
pub fn subqueries(&self) -> SubqueryIter<'_>
Return an iterator over the subqueries contained in this Query
Sourcepub fn unique_terms(&self) -> TermIter
pub fn unique_terms(&self) -> TermIter
Return an iterator over the unique terms contained in this Query
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Query
impl !RefUnwindSafe for Query
impl !Send for Query
impl !Sync for Query
impl Unpin for Query
impl UnwindSafe for Query
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