pub struct QdrantClient {
    pub channel: ChannelPool,
    pub cfg: QdrantClientConfig,
}

Fields§

§channel: ChannelPool§cfg: QdrantClientConfig

Implementations§

source§

impl QdrantClient

source

pub fn from_url(url: &str) -> QdrantClientBuilder

Create a builder to setup the client

source

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>

source

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>

source

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>

source

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>

source

pub fn new(cfg: Option<QdrantClientConfig>) -> Result<Self>

source

pub async fn health_check(&self) -> Result<HealthCheckReply>

source

pub async fn list_collections(&self) -> Result<ListCollectionsResponse>

source

pub async fn has_collection( &self, collection_name: impl ToString ) -> Result<bool>

source

pub async fn create_collection( &self, details: &CreateCollection ) -> Result<CollectionOperationResponse>

source

pub async fn update_collection( &self, collection_name: impl ToString, optimizers_config: &OptimizersConfigDiff ) -> Result<CollectionOperationResponse>

source

pub async fn delete_collection( &self, collection_name: impl ToString ) -> Result<CollectionOperationResponse>

source

pub async fn collection_info( &self, collection_name: impl ToString ) -> Result<GetCollectionInfoResponse>

source

pub async fn create_alias( &self, collection_name: impl ToString, alias_name: impl ToString ) -> Result<CollectionOperationResponse>

source

pub async fn delete_alias( &self, alias_name: impl ToString ) -> Result<CollectionOperationResponse>

source

pub async fn rename_alias( &self, old_alias_name: impl ToString, new_alias_name: impl ToString ) -> Result<CollectionOperationResponse>

source

pub async fn update_aliases( &self, change_aliases: ChangeAliases ) -> Result<CollectionOperationResponse>

source

pub async fn list_collection_aliases( &self, collection_name: impl ToString ) -> Result<ListAliasesResponse>

source

pub async fn list_aliases(&self) -> Result<ListAliasesResponse>

source

pub async fn collection_cluster_info( &self, collection_name: impl ToString ) -> Result<CollectionClusterInfoResponse>

source

pub async fn update_collection_cluster_setup( &self, collection_name: impl ToString, operation: Operation ) -> Result<UpdateCollectionClusterSetupResponse>

source

pub async fn batch_updates( &self, collection_name: impl ToString, operations: &[PointsUpdateOperation], ordering: Option<WriteOrdering> ) -> Result<UpdateBatchResponse>

source

pub async fn batch_updates_blocking( &self, collection_name: impl ToString, operations: &[PointsUpdateOperation], ordering: Option<WriteOrdering> ) -> Result<UpdateBatchResponse>

source

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.

source

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.

source

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.

source

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.

source

pub async fn set_payload( &self, collection_name: impl ToString, points: &PointsSelector, payload: Payload, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn set_payload_blocking( &self, collection_name: impl ToString, points: &PointsSelector, payload: Payload, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn overwrite_payload( &self, collection_name: impl ToString, points: &PointsSelector, payload: Payload, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn overwrite_payload_blocking( &self, collection_name: impl ToString, points: &PointsSelector, payload: Payload, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn delete_payload( &self, collection_name: impl ToString, points: &PointsSelector, keys: Vec<String>, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn delete_payload_blocking( &self, collection_name: impl ToString, points: &PointsSelector, keys: Vec<String>, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn clear_payload( &self, collection_name: impl ToString, points_selector: Option<PointsSelector>, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn clear_payload_blocking( &self, collection_name: impl ToString, points_selector: Option<PointsSelector>, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

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>

source

pub async fn search_points( &self, request: &SearchPoints ) -> Result<SearchResponse>

source

pub async fn search_batch_points( &self, request: &SearchBatchPoints ) -> Result<SearchBatchResponse>

source

pub async fn search_groups( &self, request: &SearchPointGroups ) -> Result<SearchGroupsResponse>

source

pub async fn delete_points( &self, collection_name: impl ToString, points: &PointsSelector, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn delete_points_blocking( &self, collection_name: impl ToString, points: &PointsSelector, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn delete_vectors( &self, collection_name: impl ToString, points_selector: &PointsSelector, vector_selector: &VectorsSelector, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn delete_vectors_blocking( &self, collection_name: impl ToString, points_selector: &PointsSelector, vector_selector: &VectorsSelector, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn update_vectors( &self, collection_name: impl ToString, points: &[PointVectors], ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn update_vectors_blocking( &self, collection_name: impl ToString, points: &[PointVectors], ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn scroll(&self, request: &ScrollPoints) -> Result<ScrollResponse>

source

pub async fn recommend( &self, request: &RecommendPoints ) -> Result<RecommendResponse>

source

pub async fn recommend_batch( &self, request: &RecommendBatchPoints ) -> Result<RecommendBatchResponse>

source

pub async fn recommend_groups( &self, request: &RecommendPointGroups ) -> Result<RecommendGroupsResponse>

source

pub async fn count(&self, request: &CountPoints) -> Result<CountResponse>

source

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.

source

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.

source

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

source

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>

source

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>

source

pub async fn _delete_field_index( &self, collection_name: impl ToString, field_name: impl ToString, wait: bool, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn delete_field_index( &self, collection_name: impl ToString, field_name: impl ToString, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn delete_field_index_blocking( &self, collection_name: impl ToString, field_name: impl ToString, ordering: Option<WriteOrdering> ) -> Result<PointsOperationResponse>

source

pub async fn create_snapshot( &self, collection_name: impl ToString ) -> Result<CreateSnapshotResponse>

source

pub async fn list_snapshots( &self, collection_name: impl ToString ) -> Result<ListSnapshotsResponse>

source

pub async fn delete_snapshot( &self, collection_name: impl ToString, snapshot_name: impl ToString ) -> Result<DeleteSnapshotResponse>

source

pub async fn create_full_snapshot(&self) -> Result<CreateSnapshotResponse>

source

pub async fn list_full_snapshots(&self) -> Result<ListSnapshotsResponse>

source

pub async fn delete_full_snapshot( &self, snapshot_name: impl ToString ) -> Result<DeleteSnapshotResponse>

source

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<()>
where T: ToString + Clone,

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more