pub struct DistributedSearchBuilder { /* private fields */ }Expand description
Builder for creating a distributed search cluster
Implementations§
Source§impl DistributedSearchBuilder
impl DistributedSearchBuilder
Sourcepub fn with_config(self, config: DistributedConfig) -> Self
pub fn with_config(self, config: DistributedConfig) -> Self
Set the search configuration
Sourcepub fn with_strategy(self, strategy: ShardingStrategy) -> Self
pub fn with_strategy(self, strategy: ShardingStrategy) -> Self
Set the sharding strategy
Sourcepub fn add_document(&mut self, doc_id: usize, vec: SparseVec)
pub fn add_document(&mut self, doc_id: usize, vec: SparseVec)
Add a document to the cluster (assigns to appropriate shard)
Sourcepub fn build(self) -> DistributedSearch
pub fn build(self) -> DistributedSearch
Build the distributed search cluster
Auto Trait Implementations§
impl !Freeze for DistributedSearchBuilder
impl RefUnwindSafe for DistributedSearchBuilder
impl Send for DistributedSearchBuilder
impl Sync for DistributedSearchBuilder
impl Unpin for DistributedSearchBuilder
impl UnwindSafe for DistributedSearchBuilder
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> 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