pub struct QueryFilter { /* private fields */ }Expand description
Validated scan-compatible query constraints. Ranking statistics remain corpus-wide.
Implementations§
Source§impl QueryFilter
impl QueryFilter
Sourcepub fn new(
schema: &Schema,
predicate: Option<&Predicate>,
timestamp_range: Option<(i64, i64)>,
) -> Result<Option<Self>, QueryError>
pub fn new( schema: &Schema, predicate: Option<&Predicate>, timestamp_range: Option<(i64, i64)>, ) -> Result<Option<Self>, QueryError>
Validates attributes and a half-open timestamp range against this schema.
Sourcepub fn eligible(schema: &Schema, ids: &[DocId]) -> Self
pub fn eligible(schema: &Schema, ids: &[DocId]) -> Self
Restricts all query legs to these document ids, before top-k and fusion. An empty set selects no documents. Input order and duplicates do not matter.
Sourcepub fn with_eligible(self, ids: &[DocId]) -> Self
pub fn with_eligible(self, ids: &[DocId]) -> Self
Intersects these ids with existing eligibility and attribute/time constraints.
Trait Implementations§
Source§impl Clone for QueryFilter
impl Clone for QueryFilter
Auto Trait Implementations§
impl Freeze for QueryFilter
impl RefUnwindSafe for QueryFilter
impl Send for QueryFilter
impl Sync for QueryFilter
impl Unpin for QueryFilter
impl UnsafeUnpin for QueryFilter
impl UnwindSafe for QueryFilter
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