pub enum QueryExpression {
Scoring(ScoringExpression),
Ranking(RankingExpression),
}Expand description
Universal query expression — the top level of every search request.
Scoring variants produce per-document scores via the Scorer pipeline.
Ranking variants compose result sets (fusion, RRF).
Type-safe nesting: Bool clauses accept only ScoringExpression,
Fusion sources accept QueryExpression (enabling nested fusion).
See [[feature-rrf-retrievers]].
Variants§
Scoring(ScoringExpression)
Per-document scoring query (BM25, kNN, bool, etc.).
Ranking(RankingExpression)
Result-set composition (fusion, RRF).
Implementations§
Source§impl QueryExpression
impl QueryExpression
Sourcepub fn as_scoring(&self) -> Option<&ScoringExpression>
pub fn as_scoring(&self) -> Option<&ScoringExpression>
Extract the scoring expression, if this is a Scoring variant.
Sourcepub fn scoring_expressions(&self) -> Vec<&ScoringExpression>
pub fn scoring_expressions(&self) -> Vec<&ScoringExpression>
Collect all scoring expressions from this query tree. For Scoring: returns the single expression. For Ranking(Fusion): recursively collects from all sources.
Trait Implementations§
Source§impl Clone for QueryExpression
impl Clone for QueryExpression
Source§fn clone(&self) -> QueryExpression
fn clone(&self) -> QueryExpression
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueryExpression
impl Debug for QueryExpression
Source§impl PartialEq for QueryExpression
impl PartialEq for QueryExpression
Source§fn eq(&self, other: &QueryExpression) -> bool
fn eq(&self, other: &QueryExpression) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for QueryExpression
Auto Trait Implementations§
impl Freeze for QueryExpression
impl RefUnwindSafe for QueryExpression
impl Send for QueryExpression
impl Sync for QueryExpression
impl Unpin for QueryExpression
impl UnsafeUnpin for QueryExpression
impl UnwindSafe for QueryExpression
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more