Struct qdrant_client::client::QdrantClient
source · pub struct QdrantClient {
pub channel: ChannelPool,
pub cfg: QdrantClientConfig,
}
Fields§
§channel: ChannelPool
§cfg: QdrantClientConfig
Implementations§
source§impl QdrantClient
impl QdrantClient
sourcepub fn from_url(url: &str) -> QdrantClientBuilder
pub fn from_url(url: &str) -> QdrantClientBuilder
Create a builder to setup the client
pub async fn with_snapshot_client<T, O: Future<Output = Result<T, Status>>>( &self, f: impl Fn(SnapshotsClient<InterceptedService<Channel, TokenInterceptor>>) -> O ) -> Result<T, Status>
pub async fn with_collections_client<T, O: Future<Output = Result<T, Status>>>( &self, f: impl Fn(CollectionsClient<InterceptedService<Channel, TokenInterceptor>>) -> O ) -> Result<T, Status>
pub async fn with_points_client<T, O: Future<Output = Result<T, Status>>>( &self, f: impl Fn(PointsClient<InterceptedService<Channel, TokenInterceptor>>) -> O ) -> Result<T, Status>
pub async fn with_root_qdrant_client<T, O: Future<Output = Result<T, Status>>>( &self, f: impl Fn(QdrantClient<InterceptedService<Channel, TokenInterceptor>>) -> O ) -> Result<T, Status>
pub fn new(cfg: Option<QdrantClientConfig>) -> Result<Self>
pub async fn health_check(&self) -> Result<HealthCheckReply>
pub async fn list_collections(&self) -> Result<ListCollectionsResponse>
pub async fn has_collection( &self, collection_name: impl ToString ) -> Result<bool>
pub async fn create_collection( &self, details: &CreateCollection ) -> Result<CollectionOperationResponse>
pub async fn update_collection( &self, collection_name: impl ToString, optimizers_config: &OptimizersConfigDiff ) -> Result<CollectionOperationResponse>
pub async fn delete_collection( &self, collection_name: impl ToString ) -> Result<CollectionOperationResponse>
pub async fn collection_info( &self, collection_name: impl ToString ) -> Result<GetCollectionInfoResponse>
pub async fn create_alias( &self, collection_name: impl ToString, alias_name: impl ToString ) -> Result<CollectionOperationResponse>
pub async fn delete_alias( &self, alias_name: impl ToString ) -> Result<CollectionOperationResponse>
pub async fn rename_alias( &self, old_alias_name: impl ToString, new_alias_name: impl ToString ) -> Result<CollectionOperationResponse>
pub async fn update_aliases( &self, change_aliases: ChangeAliases ) -> Result<CollectionOperationResponse>
pub async fn list_collection_aliases( &self, collection_name: impl ToString ) -> Result<ListAliasesResponse>
pub async fn list_aliases(&self) -> Result<ListAliasesResponse>
pub async fn collection_cluster_info( &self, collection_name: impl ToString ) -> Result<CollectionClusterInfoResponse>
pub async fn update_collection_cluster_setup( &self, collection_name: impl ToString, operation: Operation ) -> Result<UpdateCollectionClusterSetupResponse>
pub async fn batch_updates( &self, collection_name: impl ToString, operations: &[PointsUpdateOperation], ordering: Option<WriteOrdering> ) -> Result<UpdateBatchResponse>
pub async fn batch_updates_blocking( &self, collection_name: impl ToString, operations: &[PointsUpdateOperation], ordering: Option<WriteOrdering> ) -> Result<UpdateBatchResponse>
sourcepub async fn upsert_points(
&self,
collection_name: impl ToString,
points: Vec<PointStruct>,
ordering: Option<WriteOrdering>
) -> Result<PointsOperationResponse>
pub async fn upsert_points( &self, collection_name: impl ToString, points: Vec<PointStruct>, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
Update or insert points into the collection.
If points with given ID already exist, they will be overwritten.
This method does not wait for completion of the operation, use
[upsert_points_blocking
] for that.
Also this method does not split the points to insert to avoid timeouts,
look at [upsert_points_batch
] for that.
sourcepub async fn upsert_points_blocking(
&self,
collection_name: impl ToString,
points: Vec<PointStruct>,
ordering: Option<WriteOrdering>
) -> Result<PointsOperationResponse>
pub async fn upsert_points_blocking( &self, collection_name: impl ToString, points: Vec<PointStruct>, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
Update or insert points into the collection, wait for completion.
If points with given ID already exist, they will be overwritten.
This method does not split the points to insert to avoid timeouts,
look at [upsert_points_batch
] for that.
sourcepub async fn upsert_points_batch(
&self,
collection_name: impl ToString,
points: Vec<PointStruct>,
ordering: Option<WriteOrdering>,
chunk_size: usize
) -> Result<PointsOperationResponse>
pub async fn upsert_points_batch( &self, collection_name: impl ToString, points: Vec<PointStruct>, ordering: Option<WriteOrdering>, chunk_size: usize ) -> Result<PointsOperationResponse>
Update or insert points into the collection, splitting in chunks.
If points with given ID already exist, they will be overwritten.
This method does not wait for completion of the operation, use
[upsert_points_batch_blocking
] for that.
sourcepub async fn upsert_points_batch_blocking(
&self,
collection_name: impl ToString,
points: Vec<PointStruct>,
ordering: Option<WriteOrdering>,
chunk_size: usize
) -> Result<PointsOperationResponse>
pub async fn upsert_points_batch_blocking( &self, collection_name: impl ToString, points: Vec<PointStruct>, ordering: Option<WriteOrdering>, chunk_size: usize ) -> Result<PointsOperationResponse>
Update or insert points into the collection, splitting in chunks and waiting for completion of each. If points with given ID already exist, they will be overwritten.
pub async fn set_payload( &self, collection_name: impl ToString, points: &PointsSelector, payload: Payload, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn set_payload_blocking( &self, collection_name: impl ToString, points: &PointsSelector, payload: Payload, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn overwrite_payload( &self, collection_name: impl ToString, points: &PointsSelector, payload: Payload, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn overwrite_payload_blocking( &self, collection_name: impl ToString, points: &PointsSelector, payload: Payload, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn delete_payload( &self, collection_name: impl ToString, points: &PointsSelector, keys: Vec<String>, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn delete_payload_blocking( &self, collection_name: impl ToString, points: &PointsSelector, keys: Vec<String>, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn clear_payload( &self, collection_name: impl ToString, points_selector: Option<PointsSelector>, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn clear_payload_blocking( &self, collection_name: impl ToString, points_selector: Option<PointsSelector>, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn get_points( &self, collection_name: impl ToString, points: &[PointId], with_vectors: Option<impl Into<WithVectorsSelector>>, with_payload: Option<impl Into<WithPayloadSelector>>, read_consistency: Option<ReadConsistency> ) -> Result<GetResponse>
pub async fn search_points( &self, request: &SearchPoints ) -> Result<SearchResponse>
pub async fn search_batch_points( &self, request: &SearchBatchPoints ) -> Result<SearchBatchResponse>
pub async fn search_groups( &self, request: &SearchPointGroups ) -> Result<SearchGroupsResponse>
pub async fn delete_points( &self, collection_name: impl ToString, points: &PointsSelector, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn delete_points_blocking( &self, collection_name: impl ToString, points: &PointsSelector, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn delete_vectors( &self, collection_name: impl ToString, points_selector: &PointsSelector, vector_selector: &VectorsSelector, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn delete_vectors_blocking( &self, collection_name: impl ToString, points_selector: &PointsSelector, vector_selector: &VectorsSelector, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn update_vectors( &self, collection_name: impl ToString, points: &[PointVectors], ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn update_vectors_blocking( &self, collection_name: impl ToString, points: &[PointVectors], ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn scroll(&self, request: &ScrollPoints) -> Result<ScrollResponse>
pub async fn recommend( &self, request: &RecommendPoints ) -> Result<RecommendResponse>
pub async fn recommend_batch( &self, request: &RecommendBatchPoints ) -> Result<RecommendBatchResponse>
pub async fn recommend_groups( &self, request: &RecommendPointGroups ) -> Result<RecommendGroupsResponse>
pub async fn count(&self, request: &CountPoints) -> Result<CountResponse>
sourcepub async fn update_batch_points(
&self,
collection_name: impl ToString,
operations: &[PointsUpdateOperation],
ordering: Option<WriteOrdering>
) -> Result<UpdateBatchResponse>
pub async fn update_batch_points( &self, collection_name: impl ToString, operations: &[PointsUpdateOperation], ordering: Option<WriteOrdering> ) -> Result<UpdateBatchResponse>
Perform multiple point, vector and payload insert, update and delete operations in one request.
This method does not wait for completion of the operation, use
[update_batch_blocking
] for that.
sourcepub async fn update_batch_points_blocking(
&self,
collection_name: impl ToString,
operations: &[PointsUpdateOperation],
ordering: Option<WriteOrdering>
) -> Result<UpdateBatchResponse>
pub async fn update_batch_points_blocking( &self, collection_name: impl ToString, operations: &[PointsUpdateOperation], ordering: Option<WriteOrdering> ) -> Result<UpdateBatchResponse>
Perform multiple point, vector and payload insert, update and delete operations in one request. This method waits for completion on each operation.
sourcepub async fn _create_field_index(
&self,
collection_name: impl ToString,
field_name: impl ToString,
field_type: FieldType,
field_index_params: Option<&PayloadIndexParams>,
wait: bool,
ordering: Option<WriteOrdering>
) -> Result<PointsOperationResponse>
pub async fn _create_field_index( &self, collection_name: impl ToString, field_name: impl ToString, field_type: FieldType, field_index_params: Option<&PayloadIndexParams>, wait: bool, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
Create index for a payload field
pub async fn create_field_index( &self, collection_name: impl ToString, field_name: impl ToString, field_type: FieldType, field_index_params: Option<&PayloadIndexParams>, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn create_field_index_blocking( &self, collection_name: impl ToString, field_name: impl ToString, field_type: FieldType, field_index_params: Option<&PayloadIndexParams>, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn _delete_field_index( &self, collection_name: impl ToString, field_name: impl ToString, wait: bool, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn delete_field_index( &self, collection_name: impl ToString, field_name: impl ToString, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn delete_field_index_blocking( &self, collection_name: impl ToString, field_name: impl ToString, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>
pub async fn create_snapshot( &self, collection_name: impl ToString ) -> Result<CreateSnapshotResponse>
pub async fn list_snapshots( &self, collection_name: impl ToString ) -> Result<ListSnapshotsResponse>
pub async fn delete_snapshot( &self, collection_name: impl ToString, snapshot_name: impl ToString ) -> Result<DeleteSnapshotResponse>
pub async fn create_full_snapshot(&self) -> Result<CreateSnapshotResponse>
pub async fn list_full_snapshots(&self) -> Result<ListSnapshotsResponse>
pub async fn delete_full_snapshot( &self, snapshot_name: impl ToString ) -> Result<DeleteSnapshotResponse>
pub async fn download_snapshot<T>( &self, out_path: impl Into<PathBuf>, collection_name: T, snapshot_name: Option<T>, rest_api_uri: Option<T> ) -> Result<()>
Auto Trait Implementations§
impl RefUnwindSafe for QdrantClient
impl Send for QdrantClient
impl Sync for QdrantClient
impl Unpin for QdrantClient
impl UnwindSafe for QdrantClient
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