pub struct PointsClient<T> { /* private fields */ }
Implementations§
source§impl PointsClient<Channel>
impl PointsClient<Channel>
source§impl<T> PointsClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> PointsClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> PointsClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn upsert(
&mut self,
request: impl IntoRequest<UpsertPoints>,
) -> Result<Response<PointsOperationResponse>, Status>
pub async fn upsert( &mut self, request: impl IntoRequest<UpsertPoints>, ) -> Result<Response<PointsOperationResponse>, Status>
Perform insert + updates on points. If a point with a given ID already exists - it will be overwritten.
sourcepub async fn delete(
&mut self,
request: impl IntoRequest<DeletePoints>,
) -> Result<Response<PointsOperationResponse>, Status>
pub async fn delete( &mut self, request: impl IntoRequest<DeletePoints>, ) -> Result<Response<PointsOperationResponse>, Status>
Delete points
sourcepub async fn get(
&mut self,
request: impl IntoRequest<GetPoints>,
) -> Result<Response<GetResponse>, Status>
pub async fn get( &mut self, request: impl IntoRequest<GetPoints>, ) -> Result<Response<GetResponse>, Status>
Retrieve points
sourcepub async fn update_vectors(
&mut self,
request: impl IntoRequest<UpdatePointVectors>,
) -> Result<Response<PointsOperationResponse>, Status>
pub async fn update_vectors( &mut self, request: impl IntoRequest<UpdatePointVectors>, ) -> Result<Response<PointsOperationResponse>, Status>
Update named vectors for point
sourcepub async fn delete_vectors(
&mut self,
request: impl IntoRequest<DeletePointVectors>,
) -> Result<Response<PointsOperationResponse>, Status>
pub async fn delete_vectors( &mut self, request: impl IntoRequest<DeletePointVectors>, ) -> Result<Response<PointsOperationResponse>, Status>
Delete named vectors for points
sourcepub async fn set_payload(
&mut self,
request: impl IntoRequest<SetPayloadPoints>,
) -> Result<Response<PointsOperationResponse>, Status>
pub async fn set_payload( &mut self, request: impl IntoRequest<SetPayloadPoints>, ) -> Result<Response<PointsOperationResponse>, Status>
Set payload for points
sourcepub async fn overwrite_payload(
&mut self,
request: impl IntoRequest<SetPayloadPoints>,
) -> Result<Response<PointsOperationResponse>, Status>
pub async fn overwrite_payload( &mut self, request: impl IntoRequest<SetPayloadPoints>, ) -> Result<Response<PointsOperationResponse>, Status>
Overwrite payload for points
sourcepub async fn delete_payload(
&mut self,
request: impl IntoRequest<DeletePayloadPoints>,
) -> Result<Response<PointsOperationResponse>, Status>
pub async fn delete_payload( &mut self, request: impl IntoRequest<DeletePayloadPoints>, ) -> Result<Response<PointsOperationResponse>, Status>
Delete specified key payload for points
sourcepub async fn clear_payload(
&mut self,
request: impl IntoRequest<ClearPayloadPoints>,
) -> Result<Response<PointsOperationResponse>, Status>
pub async fn clear_payload( &mut self, request: impl IntoRequest<ClearPayloadPoints>, ) -> Result<Response<PointsOperationResponse>, Status>
Remove all payload for specified points
sourcepub async fn create_field_index(
&mut self,
request: impl IntoRequest<CreateFieldIndexCollection>,
) -> Result<Response<PointsOperationResponse>, Status>
pub async fn create_field_index( &mut self, request: impl IntoRequest<CreateFieldIndexCollection>, ) -> Result<Response<PointsOperationResponse>, Status>
Create index for field in collection
sourcepub async fn delete_field_index(
&mut self,
request: impl IntoRequest<DeleteFieldIndexCollection>,
) -> Result<Response<PointsOperationResponse>, Status>
pub async fn delete_field_index( &mut self, request: impl IntoRequest<DeleteFieldIndexCollection>, ) -> Result<Response<PointsOperationResponse>, Status>
Delete field index for collection
sourcepub async fn search(
&mut self,
request: impl IntoRequest<SearchPoints>,
) -> Result<Response<SearchResponse>, Status>
pub async fn search( &mut self, request: impl IntoRequest<SearchPoints>, ) -> Result<Response<SearchResponse>, Status>
Retrieve closest points based on vector similarity and given filtering conditions
sourcepub async fn search_batch(
&mut self,
request: impl IntoRequest<SearchBatchPoints>,
) -> Result<Response<SearchBatchResponse>, Status>
pub async fn search_batch( &mut self, request: impl IntoRequest<SearchBatchPoints>, ) -> Result<Response<SearchBatchResponse>, Status>
Retrieve closest points based on vector similarity and given filtering conditions
sourcepub async fn search_groups(
&mut self,
request: impl IntoRequest<SearchPointGroups>,
) -> Result<Response<SearchGroupsResponse>, Status>
pub async fn search_groups( &mut self, request: impl IntoRequest<SearchPointGroups>, ) -> Result<Response<SearchGroupsResponse>, Status>
Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given field
sourcepub async fn scroll(
&mut self,
request: impl IntoRequest<ScrollPoints>,
) -> Result<Response<ScrollResponse>, Status>
pub async fn scroll( &mut self, request: impl IntoRequest<ScrollPoints>, ) -> Result<Response<ScrollResponse>, Status>
Iterate over all or filtered points
sourcepub async fn recommend(
&mut self,
request: impl IntoRequest<RecommendPoints>,
) -> Result<Response<RecommendResponse>, Status>
pub async fn recommend( &mut self, request: impl IntoRequest<RecommendPoints>, ) -> Result<Response<RecommendResponse>, Status>
Look for the points which are closer to stored positive examples and at the same time further to negative examples.
sourcepub async fn recommend_batch(
&mut self,
request: impl IntoRequest<RecommendBatchPoints>,
) -> Result<Response<RecommendBatchResponse>, Status>
pub async fn recommend_batch( &mut self, request: impl IntoRequest<RecommendBatchPoints>, ) -> Result<Response<RecommendBatchResponse>, Status>
Look for the points which are closer to stored positive examples and at the same time further to negative examples.
sourcepub async fn recommend_groups(
&mut self,
request: impl IntoRequest<RecommendPointGroups>,
) -> Result<Response<RecommendGroupsResponse>, Status>
pub async fn recommend_groups( &mut self, request: impl IntoRequest<RecommendPointGroups>, ) -> Result<Response<RecommendGroupsResponse>, Status>
Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given field
sourcepub async fn discover(
&mut self,
request: impl IntoRequest<DiscoverPoints>,
) -> Result<Response<DiscoverResponse>, Status>
pub async fn discover( &mut self, request: impl IntoRequest<DiscoverPoints>, ) -> Result<Response<DiscoverResponse>, Status>
Use context and a target to find the most similar points to the target, constrained by the context.
When using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.
Since the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.
When using target (with or without context), the score behaves a little different: The integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target. The context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.
sourcepub async fn discover_batch(
&mut self,
request: impl IntoRequest<DiscoverBatchPoints>,
) -> Result<Response<DiscoverBatchResponse>, Status>
pub async fn discover_batch( &mut self, request: impl IntoRequest<DiscoverBatchPoints>, ) -> Result<Response<DiscoverBatchResponse>, Status>
Batch request points based on { positive, negative } pairs of examples, and/or a target
sourcepub async fn count(
&mut self,
request: impl IntoRequest<CountPoints>,
) -> Result<Response<CountResponse>, Status>
pub async fn count( &mut self, request: impl IntoRequest<CountPoints>, ) -> Result<Response<CountResponse>, Status>
Count points in collection with given filtering conditions
sourcepub async fn update_batch(
&mut self,
request: impl IntoRequest<UpdateBatchPoints>,
) -> Result<Response<UpdateBatchResponse>, Status>
pub async fn update_batch( &mut self, request: impl IntoRequest<UpdateBatchPoints>, ) -> Result<Response<UpdateBatchResponse>, Status>
Perform multiple update operations in one request
sourcepub async fn query(
&mut self,
request: impl IntoRequest<QueryPoints>,
) -> Result<Response<QueryResponse>, Status>
pub async fn query( &mut self, request: impl IntoRequest<QueryPoints>, ) -> Result<Response<QueryResponse>, Status>
Universally query points. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.
sourcepub async fn query_batch(
&mut self,
request: impl IntoRequest<QueryBatchPoints>,
) -> Result<Response<QueryBatchResponse>, Status>
pub async fn query_batch( &mut self, request: impl IntoRequest<QueryBatchPoints>, ) -> Result<Response<QueryBatchResponse>, Status>
Universally query points in a batch fashion. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.
sourcepub async fn query_groups(
&mut self,
request: impl IntoRequest<QueryPointGroups>,
) -> Result<Response<QueryGroupsResponse>, Status>
pub async fn query_groups( &mut self, request: impl IntoRequest<QueryPointGroups>, ) -> Result<Response<QueryGroupsResponse>, Status>
Universally query points in a group fashion. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.
sourcepub async fn facet(
&mut self,
request: impl IntoRequest<FacetCounts>,
) -> Result<Response<FacetResponse>, Status>
pub async fn facet( &mut self, request: impl IntoRequest<FacetCounts>, ) -> Result<Response<FacetResponse>, Status>
Perform facet counts. For each value in the field, count the number of points that have this value and match the conditions.
sourcepub async fn search_matrix_pairs(
&mut self,
request: impl IntoRequest<SearchMatrixPoints>,
) -> Result<Response<SearchMatrixPairsResponse>, Status>
pub async fn search_matrix_pairs( &mut self, request: impl IntoRequest<SearchMatrixPoints>, ) -> Result<Response<SearchMatrixPairsResponse>, Status>
Compute distance matrix for sampled points with a pair based output format
sourcepub async fn search_matrix_offsets(
&mut self,
request: impl IntoRequest<SearchMatrixPoints>,
) -> Result<Response<SearchMatrixOffsetsResponse>, Status>
pub async fn search_matrix_offsets( &mut self, request: impl IntoRequest<SearchMatrixPoints>, ) -> Result<Response<SearchMatrixOffsetsResponse>, Status>
Compute distance matrix for sampled points with an offset based output format
Trait Implementations§
source§impl<T: Clone> Clone for PointsClient<T>
impl<T: Clone> Clone for PointsClient<T>
source§fn clone(&self) -> PointsClient<T>
fn clone(&self) -> PointsClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for PointsClient<T>
impl<T> RefUnwindSafe for PointsClient<T>where
T: RefUnwindSafe,
impl<T> Send for PointsClient<T>where
T: Send,
impl<T> Sync for PointsClient<T>where
T: Sync,
impl<T> Unpin for PointsClient<T>where
T: Unpin,
impl<T> UnwindSafe for PointsClient<T>where
T: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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