Skip to main content

SearchEngineBuilder

Struct SearchEngineBuilder 

Source
pub struct SearchEngineBuilder { /* private fields */ }

Implementations§

Source§

impl SearchEngineBuilder

Source

pub fn audio_extractor(self, extractor: AudioExtractor) -> Self

Explicit audio extraction only; never registered with preview dispatch.

Source

pub fn extractor(self, extractor: impl Extractor + 'static) -> Self

Register an extractor before the built-in text fallback. Custom extractors are tried in registration order; errors never fall through.

Source

pub fn provider(self, provider: impl ResourceProvider + 'static) -> Self

Resource access; defaults to the local filesystem provider.

Source

pub fn shared_provider(self, provider: Arc<dyn ResourceProvider>) -> Self

Source

pub fn embedder(self, embedder: impl Embedder + 'static) -> Self

Source

pub fn shared_embedder(self, embedder: Arc<dyn Embedder>) -> Self

Source

pub fn cache(self, cache: impl EmbeddingCache + 'static) -> Self

Where vectors are kept. Defaults to an in-memory cache, i.e. ephemeral search.

Source

pub fn segmenter(self, segmenter: TextSegmenter) -> Self

Source

pub fn batch_size(self, n: usize) -> Self

How many segments are sent to the embedder per call.

Source

pub fn max_audio_duration_secs(self, seconds: u64) -> Self

Inclusive canonical audio duration limit; independent of vector identity.

Source

pub fn cache_profile(&self, model: ModelIdentity) -> CacheProfile

Describe vector identity without constructing an engine or opening a cache.

Source

pub fn build(self) -> Result<SearchEngine>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(value: T, _simd: S) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.