pub struct QdrantVectorStoreBuilder { /* private fields */ }vectorstores-qdrant only.Expand description
Builder for QdrantVectorStore.
Implementations§
Source§impl QdrantVectorStoreBuilder
impl QdrantVectorStoreBuilder
Sourcepub fn with_url(self, url: impl Into<String>) -> QdrantVectorStoreBuilder
pub fn with_url(self, url: impl Into<String>) -> QdrantVectorStoreBuilder
Set the qdrant gRPC endpoint. Defaults to
http://localhost:6334.
Sourcepub fn with_api_key(
self,
api_key: impl Into<String>,
) -> QdrantVectorStoreBuilder
pub fn with_api_key( self, api_key: impl Into<String>, ) -> QdrantVectorStoreBuilder
Attach an API key for qdrant Cloud / restricted deployments.
Sourcepub const fn with_timeout(self, timeout: Duration) -> QdrantVectorStoreBuilder
pub const fn with_timeout(self, timeout: Duration) -> QdrantVectorStoreBuilder
Override the per-call timeout. qdrant’s own default is applied when unset.
Sourcepub const fn with_distance(
self,
distance: DistanceMetric,
) -> QdrantVectorStoreBuilder
pub const fn with_distance( self, distance: DistanceMetric, ) -> QdrantVectorStoreBuilder
Override the distance metric. Defaults to
DistanceMetric::Cosine.
Sourcepub const fn with_existing_collection(self) -> QdrantVectorStoreBuilder
pub const fn with_existing_collection(self) -> QdrantVectorStoreBuilder
Skip auto-creation of the collection at build time. Use this when the collection is provisioned outside the application (schema-as-code, infra-as-code) and the application should only consume an existing collection.
Sourcepub const fn with_on_disk(self, on_disk: bool) -> QdrantVectorStoreBuilder
pub const fn with_on_disk(self, on_disk: bool) -> QdrantVectorStoreBuilder
Force on-disk vector storage (RAM saver for large indices). Default lets qdrant pick.
Sourcepub async fn build(self) -> Result<QdrantVectorStore, QdrantStoreError>
pub async fn build(self) -> Result<QdrantVectorStore, QdrantStoreError>
Finalize the builder. Connects to qdrant, creates the
collection (unless Self::with_existing_collection was
called), and provisions the namespace + doc_id payload
indexes that the namespace anchor relies on.
Auto Trait Implementations§
impl Freeze for QdrantVectorStoreBuilder
impl RefUnwindSafe for QdrantVectorStoreBuilder
impl Send for QdrantVectorStoreBuilder
impl Sync for QdrantVectorStoreBuilder
impl Unpin for QdrantVectorStoreBuilder
impl UnsafeUnpin for QdrantVectorStoreBuilder
impl UnwindSafe for QdrantVectorStoreBuilder
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request