pub struct QdrantVectorStoreBuilder { /* private fields */ }Expand description
Builder for QdrantVectorStore.
Implementations§
Source§impl QdrantVectorStoreBuilder
impl QdrantVectorStoreBuilder
Sourcepub fn with_url(self, url: impl Into<String>) -> Self
pub fn with_url(self, url: impl Into<String>) -> Self
Set the qdrant gRPC endpoint. Defaults to
http://localhost:6334.
Sourcepub fn with_api_key(self, api_key: impl Into<String>) -> Self
pub fn with_api_key(self, api_key: impl Into<String>) -> Self
Attach an API key for qdrant Cloud / restricted deployments.
Sourcepub const fn with_timeout(self, timeout: Duration) -> Self
pub const fn with_timeout(self, timeout: Duration) -> Self
Override the per-call timeout. qdrant’s own default is applied when unset.
Sourcepub const fn with_distance(self, distance: DistanceMetric) -> Self
pub const fn with_distance(self, distance: DistanceMetric) -> Self
Override the distance metric. Defaults to
DistanceMetric::Cosine.
Sourcepub const fn with_existing_collection(self) -> Self
pub const fn with_existing_collection(self) -> Self
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) -> Self
pub const fn with_on_disk(self, on_disk: bool) -> Self
Force on-disk vector storage (RAM saver for large indices). Default lets qdrant pick.
Sourcepub async fn build(self) -> QdrantStoreResult<QdrantVectorStore>
pub async fn build(self) -> QdrantStoreResult<QdrantVectorStore>
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> 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> 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