Struct MatchIndexer
pub struct MatchIndexer { /* private fields */ }Implementations§
§impl MatchIndexer
impl MatchIndexer
pub fn new(_: MatchIndexerOptions) -> Self
pub fn validate_query_input(&self, value: &str) -> Result<(), EncryptionError>
pub fn validate_query_input(&self, value: &str) -> Result<(), EncryptionError>
Reject a match QUERY input that would tokenize to nothing.
A zero-token input yields an empty bloom filter, and the EQL match
comparison (query bits ⊆ row bits) is vacuously true for an empty
query — so the term silently matches every row. That’s never what a
query means, so callers minting match query terms must reject the
input instead. The most common trigger is an input shorter than an
Ngram tokenizer’s token_length (default 3), but this also catches
e.g. a Stop token filter swallowing every token.
Storage-side indexing must NOT use this: storing a short string is legal (the value simply isn’t findable via the match index).
The error message never contains the input itself — only its length after the char filter, and the index’s minimum.
pub fn encrypt( &self, plaintext: &Plaintext, index_key: &IndexKey, ) -> Result<IndexTerm, EncryptionError>
Trait Implementations§
§impl Default for MatchIndexer
impl Default for MatchIndexer
§impl IndexerInit for MatchIndexer
impl IndexerInit for MatchIndexer
Auto Trait Implementations§
impl Freeze for MatchIndexer
impl RefUnwindSafe for MatchIndexer
impl Send for MatchIndexer
impl Sync for MatchIndexer
impl Unpin for MatchIndexer
impl UnsafeUnpin for MatchIndexer
impl UnwindSafe for MatchIndexer
Blanket Implementations§
impl<T> AuthStrategyBounds for T
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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