pub struct Search<'a> { /* private fields */ }
Implementations§
Source§impl Search<'_>
impl Search<'_>
pub fn execute_hybrid( &self, semantic_ratio: f32, ) -> Result<(SearchResult, Option<u32>)>
Source§impl<'a> Search<'a>
impl<'a> Search<'a>
pub fn new(rtxn: &'a RoTxn<'a>, index: &'a Index) -> Search<'a>
pub fn query(&mut self, query: impl Into<String>) -> &mut Search<'a>
pub fn semantic( &mut self, embedder_name: String, embedder: Arc<Embedder>, quantized: bool, vector: Option<Vec<f32>>, ) -> &mut Search<'a>
pub fn offset(&mut self, offset: usize) -> &mut Search<'a>
pub fn limit(&mut self, limit: usize) -> &mut Search<'a>
pub fn sort_criteria(&mut self, criteria: Vec<AscDesc>) -> &mut Search<'a>
pub fn distinct(&mut self, distinct: String) -> &mut Search<'a>
pub fn searchable_attributes( &mut self, searchable: &'a [String], ) -> &mut Search<'a>
pub fn terms_matching_strategy( &mut self, value: TermsMatchingStrategy, ) -> &mut Search<'a>
pub fn scoring_strategy(&mut self, value: ScoringStrategy) -> &mut Search<'a>
pub fn words_limit(&mut self, value: usize) -> &mut Search<'a>
pub fn filter(&mut self, condition: Filter<'a>) -> &mut Search<'a>
Sourcepub fn exhaustive_number_hits(
&mut self,
exhaustive_number_hits: bool,
) -> &mut Search<'a>
pub fn exhaustive_number_hits( &mut self, exhaustive_number_hits: bool, ) -> &mut Search<'a>
Forces the search to exhaustively compute the number of candidates, this will increase the search time but allows finite pagination.
pub fn time_budget(&mut self, time_budget: TimeBudget) -> &mut Search<'a>
pub fn ranking_score_threshold( &mut self, ranking_score_threshold: f64, ) -> &mut Search<'a>
pub fn locales(&mut self, locales: Vec<Language>) -> &mut Search<'a>
pub fn execute_for_candidates( &self, has_vector_search: bool, ) -> Result<RoaringBitmap>
pub fn execute(&self) -> Result<SearchResult>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Search<'a>
impl<'a> !RefUnwindSafe for Search<'a>
impl<'a> !Send for Search<'a>
impl<'a> !Sync for Search<'a>
impl<'a> Unpin for Search<'a>
impl<'a> !UnwindSafe for Search<'a>
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> 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