pub struct SearchQuery {
pub text: String,
pub page: u32,
pub page_size: u32,
pub search_in: Option<Vec<String>>,
pub substring: bool,
pub channel_id: Option<String>,
pub text_config: String,
pub include_fuzzy: bool,
pub sort_by: SearchSort,
pub desc: bool,
}Fields§
§text: String§page: u32§page_size: u32§search_in: Option<Vec<String>>Which text may match. None means every field, which is what the
database does with a NULL list.
substring: boolLiteral matching over search_in, rather than the text index.
channel_id: Option<String>§text_config: StringPostgres text search configuration, e.g. english, spanish, simple.
include_fuzzy: boolInclude the fuzzy trigram tier. See the note on the SQL: it matches whole words, so it forgives a typo without matching a fragment of an unrelated one, and a well-formed query may still want it off.
sort_by: SearchSort§desc: boolDescending. Meaningless for SearchSort::Relevance, which is always
best-first; the database is told so explicitly rather than being handed
a flag it would honour and ignore.
Trait Implementations§
Source§impl Clone for SearchQuery
impl Clone for SearchQuery
Auto Trait Implementations§
impl Forget for SearchQuery
impl Freeze for SearchQuery
impl Move for SearchQuery
impl RefUnwindSafe for SearchQuery
impl Send for SearchQuerywhere
RawVecInner: Send,
impl Sync for SearchQuerywhere
RawVecInner: Sync,
impl Unpin for SearchQuery
impl UnsafeUnpin for SearchQuerywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for SearchQuerywhere
RawVecInner: UnwindSafe,
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> 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