pub struct LexicalQuery {
pub groups: Vec<Vec<String>>,
}Expand description
OR-ed groups of tokens. All tokens of a group must occur in one field, without requiring adjacency or source order; plain words are groups of one.
Fields§
§groups: Vec<Vec<String>>Implementations§
Source§impl LexicalQuery
impl LexicalQuery
Sourcepub fn new<'a>(queries: impl IntoIterator<Item = &'a str>) -> Self
pub fn new<'a>(queries: impl IntoIterator<Item = &'a str>) -> Self
Build from one or more phrasings. Whitespace separates groups; within a group, punctuation joins tokens into a conjunction. Single-token stopwords are dropped, so a question matches on its content words.
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for LexicalQuery
impl Clone for LexicalQuery
Source§impl Debug for LexicalQuery
impl Debug for LexicalQuery
Source§impl Default for LexicalQuery
impl Default for LexicalQuery
impl Eq for LexicalQuery
Source§impl PartialEq for LexicalQuery
impl PartialEq for LexicalQuery
impl StructuralPartialEq for LexicalQuery
Auto Trait Implementations§
impl Freeze for LexicalQuery
impl RefUnwindSafe for LexicalQuery
impl Send for LexicalQuery
impl Sync for LexicalQuery
impl Unpin for LexicalQuery
impl UnsafeUnpin for LexicalQuery
impl UnwindSafe for LexicalQuery
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.