From c9d53d0c86b74fcf57ecdfa501758d03b95f020d Mon Sep 17 00:00:00 2001 From: jojii Date: Tue, 1 Oct 2024 14:47:02 +0200 Subject: [PATCH 1/8] update protos and rust structs --- proto/collections.proto | 19 +- proto/points.proto | 59 ++++- proto/points_service.proto | 12 + src/builder_ext.rs | 39 +++- src/qdrant.rs | 444 ++++++++++++++++++++++++++++++++++++- tests/builder_coverage.rs | 15 +- tests/protos.rs | 50 +++++ 7 files changed, 612 insertions(+), 26 deletions(-) diff --git a/proto/collections.proto b/proto/collections.proto index 302593a..cfc64a7 100644 --- a/proto/collections.proto +++ b/proto/collections.proto @@ -310,6 +310,18 @@ enum ShardingMethod { Custom = 1; // Shard by user-defined key } +message StrictModeConfig { + optional bool enabled = 1; + optional uint32 max_query_limit = 2; + optional uint32 max_timeout = 3; + optional bool unindexed_filtering_retrieve = 4; + optional bool unindexed_filtering_update = 5; + + optional uint32 search_max_hnsw_ef = 6; + optional bool search_allow_exact = 7; + optional float search_max_oversampling = 8; +} + message CreateCollection { string collection_name = 1; // Name of the collection reserved 2; // Deprecated @@ -327,6 +339,7 @@ message CreateCollection { optional QuantizationConfig quantization_config = 14; // Quantization configuration of vector optional ShardingMethod sharding_method = 15; // Sharding method optional SparseVectorConfig sparse_vectors_config = 16; // Configuration for sparse vectors + optional StrictModeConfig strict_mode_config = 17; // Configuration for strict mode } message UpdateCollection { @@ -376,6 +389,7 @@ message CollectionConfig { OptimizersConfigDiff optimizer_config = 3; // Configuration of the optimizers WalConfigDiff wal_config = 4; // Configuration of the Write-Ahead-Log optional QuantizationConfig quantization_config = 5; // Configuration of the vector quantization + optional StrictModeConfig strict_mode_config = 6; // Configuration of strict mode. } enum TokenizerType { @@ -392,8 +406,8 @@ message KeywordIndexParams { } message IntegerIndexParams { - bool lookup = 1; // If true - support direct lookups. - bool range = 2; // If true - support ranges filters. + optional bool lookup = 1; // If true - support direct lookups. + optional bool range = 2; // If true - support ranges filters. optional bool is_principal = 3; // If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests. optional bool on_disk = 4; // If true - store index on disk. } @@ -411,6 +425,7 @@ message TextIndexParams { optional bool lowercase = 2; // If true - all tokens will be lowercase optional uint64 min_token_len = 3; // Minimal token length optional uint64 max_token_len = 4; // Maximal token length + optional bool on_disk = 5; // If true - store index on disk. } message BoolIndexParams { diff --git a/proto/points.proto b/proto/points.proto index 858cb99..03fa593 100644 --- a/proto/points.proto +++ b/proto/points.proto @@ -589,17 +589,59 @@ message QueryPointGroups { optional ShardKeySelector shard_key_selector = 17; // Specify in which shards to look for the points, if not specified - look in all shards } +message FacetCounts { + string collection_name = 1; // Name of the collection + string key = 2; // Payload key of the facet + optional Filter filter = 3; // Filter conditions - return only those points that satisfy the specified conditions. + optional uint64 limit = 4; // Max number of facets. Default is 10. + optional bool exact = 5; // If true, return exact counts, slower but useful for debugging purposes. Default is false. + optional uint64 timeout = 6; // If set, overrides global timeout setting for this request. Unit is seconds. + optional ReadConsistency read_consistency = 7; // Options for specifying read consistency guarantees + optional ShardKeySelector shard_key_selector = 8; // Specify in which shards to look for the points, if not specified - look in all shards +} + message FacetValue { oneof variant { string string_value = 1; // String value from the facet + int64 integer_value = 2; // Integer value from the facet + bool bool_value = 3; // Boolean value from the facet } } -message FacetValueHit { +message FacetHit { FacetValue value = 1; // Value from the facet uint64 count = 2; // Number of points with this value } +message SearchMatrixPoints { + string collection_name = 1; // Name of the collection + optional Filter filter = 2; // Filter conditions - return only those points that satisfy the specified conditions. + optional uint64 sample = 3; // How many points to select and search within. Default is 10. + optional uint64 limit = 4; // How many neighbours per sample to find. Default is 3. + optional string using = 5; // Define which vector to use for querying. If missing, the default vector is is used. + optional uint64 timeout = 6; // If set, overrides global timeout setting for this request. Unit is seconds. + optional ReadConsistency read_consistency = 7; // Options for specifying read consistency guarantees + optional ShardKeySelector shard_key_selector = 8; // Specify in which shards to look for the points, if not specified - look in all shards +} + +message SearchMatrixPairs { + repeated SearchMatrixPair pairs = 1; // List of pairs of points with scores +} + +message SearchMatrixPair { + PointId a = 1; // first id of the pair + PointId b = 2; // second id of the pair + float score = 3; // score of the pair +} + +message SearchMatrixOffsets { + repeated uint64 offsets_row = 1; // Row indices of the matrix + repeated uint64 offsets_col = 2; // Column indices of the matrix + repeated float scores = 3; // Scores associated with matrix coordinates + repeated PointId ids = 4; // Ids of the points in order +} + + message PointsUpdateOperation { message PointStructList { repeated PointStruct points = 1; @@ -814,6 +856,21 @@ message UpdateBatchResponse { double time = 2; // Time spent to process } +message FacetResponse { + repeated FacetHit hits = 1; + double time = 2; // Time spent to process +} + +message SearchMatrixPairsResponse { + SearchMatrixPairs result = 1; + double time = 2; // Time spent to process +} + +message SearchMatrixOffsetsResponse { + SearchMatrixOffsets result = 1; + double time = 2; // Time spent to process +} + // --------------------------------------------- // ------------- Filter Conditions ------------- // --------------------------------------------- diff --git a/proto/points_service.proto b/proto/points_service.proto index def47d1..ef83007 100644 --- a/proto/points_service.proto +++ b/proto/points_service.proto @@ -121,4 +121,16 @@ service Points { 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. */ rpc QueryGroups (QueryPointGroups) returns (QueryGroupsResponse) {} + /* + Perform facet counts. For each value in the field, count the number of points that have this value and match the conditions. + */ + rpc Facet (FacetCounts) returns (FacetResponse) {} + /* + Compute distance matrix for sampled points with a pair based output format + */ + rpc SearchMatrixPairs (SearchMatrixPoints) returns (SearchMatrixPairsResponse) {} + /* + Compute distance matrix for sampled points with an offset based output format + */ + rpc SearchMatrixOffsets (SearchMatrixPoints) returns (SearchMatrixOffsetsResponse) {} } diff --git a/src/builder_ext.rs b/src/builder_ext.rs index b580c99..873db15 100644 --- a/src/builder_ext.rs +++ b/src/builder_ext.rs @@ -8,17 +8,17 @@ use crate::qdrant::{ DeleteFieldIndexCollectionBuilder, DeletePayloadPointsBuilder, DeletePointVectorsBuilder, DeletePointsBuilder, DeleteShardKey, DeleteShardKeyRequestBuilder, DeleteSnapshotRequestBuilder, DiscoverBatchPointsBuilder, DiscoverPoints, - DiscoverPointsBuilder, Distance, FieldType, GetPointsBuilder, LookupLocationBuilder, - MoveShardBuilder, PayloadExcludeSelector, PayloadIncludeSelector, PointId, PointStruct, - PointVectors, PointsUpdateOperation, ProductQuantizationBuilder, QuantizationType, - QueryBatchPointsBuilder, QueryPointGroupsBuilder, QueryPoints, QueryPointsBuilder, - RecommendBatchPointsBuilder, RecommendExample, RecommendPointGroupsBuilder, RecommendPoints, - RecommendPointsBuilder, RenameAliasBuilder, ReplicaBuilder, ReplicateShardBuilder, - ScalarQuantizationBuilder, ScrollPointsBuilder, SearchBatchPointsBuilder, - SearchPointGroupsBuilder, SearchPoints, SearchPointsBuilder, SetPayloadPointsBuilder, ShardKey, - UpdateBatchPointsBuilder, UpdateCollectionBuilder, UpdateCollectionClusterSetupRequestBuilder, - UpdatePointVectorsBuilder, UpsertPointsBuilder, Value, VectorParamsBuilder, VectorsSelector, - WithLookupBuilder, + DiscoverPointsBuilder, Distance, FacetCountsBuilder, FieldType, GetPointsBuilder, + LookupLocationBuilder, MoveShardBuilder, PayloadExcludeSelector, PayloadIncludeSelector, + PointId, PointStruct, PointVectors, PointsUpdateOperation, ProductQuantizationBuilder, + QuantizationType, QueryBatchPointsBuilder, QueryPointGroupsBuilder, QueryPoints, + QueryPointsBuilder, RecommendBatchPointsBuilder, RecommendExample, RecommendPointGroupsBuilder, + RecommendPoints, RecommendPointsBuilder, RenameAliasBuilder, ReplicaBuilder, + ReplicateShardBuilder, ScalarQuantizationBuilder, ScrollPointsBuilder, + SearchBatchPointsBuilder, SearchMatrixPointsBuilder, SearchPointGroupsBuilder, SearchPoints, + SearchPointsBuilder, SetPayloadPointsBuilder, ShardKey, UpdateBatchPointsBuilder, + UpdateCollectionBuilder, UpdateCollectionClusterSetupRequestBuilder, UpdatePointVectorsBuilder, + UpsertPointsBuilder, Value, VectorParamsBuilder, VectorsSelector, WithLookupBuilder, }; impl VectorParamsBuilder { @@ -545,3 +545,20 @@ impl QueryPointGroupsBuilder { builder } } + +impl FacetCountsBuilder { + pub fn new(collection_name: impl Into, key: impl Into) -> FacetCountsBuilder { + let mut builder = Self::empty(); + builder.collection_name = Some(collection_name.into()); + builder.key = Some(key.into()); + builder + } +} + +impl SearchMatrixPointsBuilder { + pub fn new(collection_name: impl Into) -> SearchMatrixPointsBuilder { + let mut builder = Self::empty(); + builder.collection_name = Some(collection_name.into()); + builder + } +} diff --git a/src/qdrant.rs b/src/qdrant.rs index d99bd66..0d771f4 100644 --- a/src/qdrant.rs +++ b/src/qdrant.rs @@ -492,6 +492,39 @@ pub mod quantization_config_diff { pattern = "owned" )] #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct StrictModeConfig { + #[prost(bool, optional, tag = "1")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub enabled: ::core::option::Option, + #[prost(uint32, optional, tag = "2")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub max_query_limit: ::core::option::Option, + #[prost(uint32, optional, tag = "3")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub max_timeout: ::core::option::Option, + #[prost(bool, optional, tag = "4")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub unindexed_filtering_retrieve: ::core::option::Option, + #[prost(bool, optional, tag = "5")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub unindexed_filtering_update: ::core::option::Option, + #[prost(uint32, optional, tag = "6")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub search_max_hnsw_ef: ::core::option::Option, + #[prost(bool, optional, tag = "7")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub search_allow_exact: ::core::option::Option, + #[prost(float, optional, tag = "8")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub search_max_oversampling: ::core::option::Option, +} +#[derive(derive_builder::Builder)] +#[builder( + build_fn(private, error = "std::convert::Infallible", name = "build_inner"), + pattern = "owned" +)] +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateCollection { /// Name of the collection @@ -556,6 +589,10 @@ pub struct CreateCollection { #[prost(message, optional, tag = "16")] #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] pub sparse_vectors_config: ::core::option::Option, + /// Configuration for strict mode + #[prost(message, optional, tag = "17")] + #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] + pub strict_mode_config: ::core::option::Option, } #[derive(derive_builder::Builder)] #[builder( @@ -704,6 +741,9 @@ pub struct CollectionConfig { /// Configuration of the vector quantization #[prost(message, optional, tag = "5")] pub quantization_config: ::core::option::Option, + /// Configuration of strict mode. + #[prost(message, optional, tag = "6")] + pub strict_mode_config: ::core::option::Option, } #[derive(derive_builder::Builder)] #[builder( @@ -732,13 +772,13 @@ pub struct KeywordIndexParams { #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct IntegerIndexParams { /// If true - support direct lookups. - #[prost(bool, tag = "1")] + #[prost(bool, optional, tag = "1")] #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] - pub lookup: bool, + pub lookup: ::core::option::Option, /// If true - support ranges filters. - #[prost(bool, tag = "2")] + #[prost(bool, optional, tag = "2")] #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] - pub range: bool, + pub range: ::core::option::Option, /// If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests. #[prost(bool, optional, tag = "3")] #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] @@ -793,6 +833,10 @@ pub struct TextIndexParams { #[prost(uint64, optional, tag = "4")] #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] pub max_token_len: ::core::option::Option, + /// If true - store index on disk. + #[prost(bool, optional, tag = "5")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub on_disk: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] @@ -4940,10 +4984,52 @@ pub struct QueryPointGroups { #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] pub shard_key_selector: ::core::option::Option, } +#[derive(derive_builder::Builder)] +#[builder( + build_fn(private, name = "build_inner"), + pattern = "owned", + custom_constructor +)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FacetCounts { + /// Name of the collection + #[prost(string, tag = "1")] + #[builder(field(vis = "pub(crate)"))] + pub collection_name: ::prost::alloc::string::String, + /// Payload key of the facet + #[prost(string, tag = "2")] + #[builder(field(vis = "pub(crate)"))] + pub key: ::prost::alloc::string::String, + /// Filter conditions - return only those points that satisfy the specified conditions. + #[prost(message, optional, tag = "3")] + #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] + pub filter: ::core::option::Option, + /// Max number of facets. Default is 10. + #[prost(uint64, optional, tag = "4")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub limit: ::core::option::Option, + /// If true, return exact counts, slower but useful for debugging purposes. Default is false. + #[prost(bool, optional, tag = "5")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub exact: ::core::option::Option, + /// If set, overrides global timeout setting for this request. Unit is seconds. + #[prost(uint64, optional, tag = "6")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub timeout: ::core::option::Option, + /// Options for specifying read consistency guarantees + #[prost(message, optional, tag = "7")] + #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] + pub read_consistency: ::core::option::Option, + /// Specify in which shards to look for the points, if not specified - look in all shards + #[prost(message, optional, tag = "8")] + #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] + pub shard_key_selector: ::core::option::Option, +} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FacetValue { - #[prost(oneof = "facet_value::Variant", tags = "1")] + #[prost(oneof = "facet_value::Variant", tags = "1, 2, 3")] pub variant: ::core::option::Option, } /// Nested message and enum types in `FacetValue`. @@ -4954,11 +5040,17 @@ pub mod facet_value { /// String value from the facet #[prost(string, tag = "1")] StringValue(::prost::alloc::string::String), + /// Integer value from the facet + #[prost(int64, tag = "2")] + IntegerValue(i64), + /// Boolean value from the facet + #[prost(bool, tag = "3")] + BoolValue(bool), } } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct FacetValueHit { +pub struct FacetHit { /// Value from the facet #[prost(message, optional, tag = "1")] pub value: ::core::option::Option, @@ -4966,6 +5058,84 @@ pub struct FacetValueHit { #[prost(uint64, tag = "2")] pub count: u64, } +#[derive(derive_builder::Builder)] +#[builder( + build_fn(private, name = "build_inner"), + pattern = "owned", + custom_constructor +)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchMatrixPoints { + /// Name of the collection + #[prost(string, tag = "1")] + #[builder(field(vis = "pub(crate)"))] + pub collection_name: ::prost::alloc::string::String, + /// Filter conditions - return only those points that satisfy the specified conditions. + #[prost(message, optional, tag = "2")] + #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] + pub filter: ::core::option::Option, + /// How many points to select and search within. Default is 10. + #[prost(uint64, optional, tag = "3")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub sample: ::core::option::Option, + /// How many neighbours per sample to find. Default is 3. + #[prost(uint64, optional, tag = "4")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub limit: ::core::option::Option, + /// Define which vector to use for querying. If missing, the default vector is is used. + #[prost(string, optional, tag = "5")] + #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] + pub using: ::core::option::Option<::prost::alloc::string::String>, + /// If set, overrides global timeout setting for this request. Unit is seconds. + #[prost(uint64, optional, tag = "6")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub timeout: ::core::option::Option, + /// Options for specifying read consistency guarantees + #[prost(message, optional, tag = "7")] + #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] + pub read_consistency: ::core::option::Option, + /// Specify in which shards to look for the points, if not specified - look in all shards + #[prost(message, optional, tag = "8")] + #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] + pub shard_key_selector: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchMatrixPairs { + /// List of pairs of points with scores + #[prost(message, repeated, tag = "1")] + pub pairs: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchMatrixPair { + /// first id of the pair + #[prost(message, optional, tag = "1")] + pub a: ::core::option::Option, + /// second id of the pair + #[prost(message, optional, tag = "2")] + pub b: ::core::option::Option, + /// score of the pair + #[prost(float, tag = "3")] + pub score: f32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchMatrixOffsets { + /// Row indices of the matrix + #[prost(uint64, repeated, tag = "1")] + pub offsets_row: ::prost::alloc::vec::Vec, + /// Column indices of the matrix + #[prost(uint64, repeated, tag = "2")] + pub offsets_col: ::prost::alloc::vec::Vec, + /// Scores associated with matrix coordinates + #[prost(float, repeated, tag = "3")] + pub scores: ::prost::alloc::vec::Vec, + /// Ids of the points in order + #[prost(message, repeated, tag = "4")] + pub ids: ::prost::alloc::vec::Vec, +} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PointsUpdateOperation { @@ -5400,6 +5570,33 @@ pub struct UpdateBatchResponse { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] +pub struct FacetResponse { + #[prost(message, repeated, tag = "1")] + pub hits: ::prost::alloc::vec::Vec, + /// Time spent to process + #[prost(double, tag = "2")] + pub time: f64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchMatrixPairsResponse { + #[prost(message, optional, tag = "1")] + pub result: ::core::option::Option, + /// Time spent to process + #[prost(double, tag = "2")] + pub time: f64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchMatrixOffsetsResponse { + #[prost(message, optional, tag = "1")] + pub result: ::core::option::Option, + /// Time spent to process + #[prost(double, tag = "2")] + pub time: f64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Filter { /// At least one of those conditions should match #[prost(message, repeated, tag = "1")] @@ -6649,6 +6846,81 @@ pub mod points_client { req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "QueryGroups")); self.inner.unary(req, path, codec).await } + /// + /// Perform facet counts. For each value in the field, count the number of points that have this value and match the conditions. + pub async fn facet( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Facet"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Facet")); + self.inner.unary(req, path, codec).await + } + /// + /// Compute distance matrix for sampled points with a pair based output format + pub async fn search_matrix_pairs( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/qdrant.Points/SearchMatrixPairs", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("qdrant.Points", "SearchMatrixPairs")); + self.inner.unary(req, path, codec).await + } + /// + /// Compute distance matrix for sampled points with an offset based output format + pub async fn search_matrix_offsets( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/qdrant.Points/SearchMatrixOffsets", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("qdrant.Points", "SearchMatrixOffsets")); + self.inner.unary(req, path, codec).await + } } } /// Generated server implementations. @@ -6882,6 +7154,30 @@ pub mod points_server { tonic::Response, tonic::Status, >; + /// + /// Perform facet counts. For each value in the field, count the number of points that have this value and match the conditions. + async fn facet( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + /// + /// Compute distance matrix for sampled points with a pair based output format + async fn search_matrix_pairs( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// + /// Compute distance matrix for sampled points with an offset based output format + async fn search_matrix_offsets( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct PointsServer { @@ -8052,6 +8348,139 @@ pub mod points_server { }; Box::pin(fut) } + "/qdrant.Points/Facet" => { + #[allow(non_camel_case_types)] + struct FacetSvc(pub Arc); + impl tonic::server::UnaryService + for FacetSvc { + type Response = super::FacetResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::facet(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = FacetSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/qdrant.Points/SearchMatrixPairs" => { + #[allow(non_camel_case_types)] + struct SearchMatrixPairsSvc(pub Arc); + impl< + T: Points, + > tonic::server::UnaryService + for SearchMatrixPairsSvc { + type Response = super::SearchMatrixPairsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::search_matrix_pairs(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = SearchMatrixPairsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/qdrant.Points/SearchMatrixOffsets" => { + #[allow(non_camel_case_types)] + struct SearchMatrixOffsetsSvc(pub Arc); + impl< + T: Points, + > tonic::server::UnaryService + for SearchMatrixOffsetsSvc { + type Response = super::SearchMatrixOffsetsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::search_matrix_offsets(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = SearchMatrixOffsetsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } _ => { Box::pin(async move { Ok( @@ -9214,6 +9643,9 @@ builder_type_conversions!(ContextInput, ContextInputBuilder); builder_type_conversions!(ContextInputPair, ContextInputPairBuilder, true); builder_type_conversions!(MultiVectorConfig, MultiVectorConfigBuilder, true); builder_type_conversions!(QueryPointGroups, QueryPointGroupsBuilder, true); +builder_type_conversions!(StrictModeConfig, StrictModeConfigBuilder); +builder_type_conversions!(FacetCounts, FacetCountsBuilder, true); +builder_type_conversions!(SearchMatrixPoints, SearchMatrixPointsBuilder, true); builder_type_conversions!(DeletePoints, DeletePointsBuilder, true); pub use crate::manual_builder::*; diff --git a/tests/builder_coverage.rs b/tests/builder_coverage.rs index 2256d79..7b64244 100644 --- a/tests/builder_coverage.rs +++ b/tests/builder_coverage.rs @@ -6,12 +6,13 @@ use qdrant_client::qdrant::{ CreateFieldIndexCollectionBuilder, CreateShardKeyRequestBuilder, DeleteCollectionBuilder, DeleteFieldIndexCollectionBuilder, DeletePayloadPointsBuilder, DeletePointVectorsBuilder, DeletePointsBuilder, DeleteShardKeyRequestBuilder, DeleteSnapshotRequestBuilder, - DiscoverBatchPointsBuilder, DiscoverInputBuilder, DiscoverPointsBuilder, Distance, FieldType, - GetPointsBuilder, LookupLocationBuilder, MoveShardBuilder, MultiVectorComparator, - MultiVectorConfigBuilder, OrderByBuilder, ProductQuantizationBuilder, QueryBatchPointsBuilder, - QueryPointGroupsBuilder, QueryPointsBuilder, RecommendBatchPointsBuilder, - RecommendPointGroupsBuilder, RecommendPointsBuilder, RenameAliasBuilder, ReplicaBuilder, - ReplicateShardBuilder, ScrollPointsBuilder, SearchBatchPointsBuilder, SearchPointGroupsBuilder, + DiscoverBatchPointsBuilder, DiscoverInputBuilder, DiscoverPointsBuilder, Distance, + FacetCountsBuilder, FieldType, GetPointsBuilder, LookupLocationBuilder, MoveShardBuilder, + MultiVectorComparator, MultiVectorConfigBuilder, OrderByBuilder, ProductQuantizationBuilder, + QueryBatchPointsBuilder, QueryPointGroupsBuilder, QueryPointsBuilder, + RecommendBatchPointsBuilder, RecommendPointGroupsBuilder, RecommendPointsBuilder, + RenameAliasBuilder, ReplicaBuilder, ReplicateShardBuilder, ScrollPointsBuilder, + SearchBatchPointsBuilder, SearchMatrixPointsBuilder, SearchPointGroupsBuilder, SearchPointsBuilder, SetPayloadPointsBuilder, TextIndexParamsBuilder, TokenizerType, UpdateBatchPointsBuilder, UpdateCollectionBuilder, UpdateCollectionClusterSetupRequestBuilder, UpdatePointVectorsBuilder, UpsertPointsBuilder, VectorParamsBuilder, WithLookupBuilder, @@ -80,4 +81,6 @@ fn builder_coverage() { DiscoverInputBuilder::new(vec![1.0], ContextInputBuilder::default()).build(); MultiVectorConfigBuilder::new(MultiVectorComparator::MaxSim).build(); QueryPointGroupsBuilder::new("", "").build(); + FacetCountsBuilder::new("", "").build(); + SearchMatrixPointsBuilder::new("").build(); } diff --git a/tests/protos.rs b/tests/protos.rs index fa199a2..5cb5385 100644 --- a/tests/protos.rs +++ b/tests/protos.rs @@ -206,6 +206,10 @@ fn configure_builder(builder: Builder) -> Builder { "CreateCollection.sparse_vectors_config", DEFAULT_OPTION_INTO, ), + ("CreateCollection.strict_mode_config", DEFAULT_OPTION_INTO), + ("StrictModeConfig.search_max_hnsw_ef", DEFAULT_OPTION), + ("StrictModeConfig.search_allow_exact", DEFAULT_OPTION), + ("StrictModeConfig.search_max_oversampling", DEFAULT_OPTION), // HnswConfig ("HnswConfigDiff.m", DEFAULT_OPTION), ("HnswConfigDiff.ef_construct", DEFAULT_OPTION), @@ -705,6 +709,7 @@ fn configure_builder(builder: Builder) -> Builder { ("TextIndexParams.lowercase", DEFAULT_OPTION), ("TextIndexParams.min_token_len", DEFAULT_OPTION), ("TextIndexParams.max_token_len", DEFAULT_OPTION), + ("TextIndexParams.on_disk", DEFAULT_OPTION), // CreateAlias ("CreateAlias.collection_name", PUBLIC_ONLY), ("CreateAlias.alias_name", PUBLIC_ONLY), @@ -763,6 +768,36 @@ fn configure_builder(builder: Builder) -> Builder { ("QueryPointGroups.with_lookup", DEFAULT_OPTION_INTO), ("QueryPointGroups.timeout", DEFAULT_OPTION_INTO), ("QueryPointGroups.shard_key_selector", DEFAULT_OPTION_INTO), + // StrictModeConfig + ("StrictModeConfig.enabled", DEFAULT_OPTION), + ("StrictModeConfig.max_query_limit", DEFAULT_OPTION), + ("StrictModeConfig.max_timeout", DEFAULT_OPTION), + ( + "StrictModeConfig.unindexed_filtering_retrieve", + DEFAULT_OPTION, + ), + ( + "StrictModeConfig.unindexed_filtering_update", + DEFAULT_OPTION, + ), + // FacetCounts + ("FacetCounts.collection_name", PUBLIC_ONLY), + ("FacetCounts.key", PUBLIC_ONLY), + ("FacetCounts.filter", DEFAULT_OPTION_INTO), + ("FacetCounts.limit", DEFAULT_OPTION), + ("FacetCounts.exact", DEFAULT_OPTION), + ("FacetCounts.timeout", DEFAULT_OPTION), + ("FacetCounts.read_consistency", DEFAULT_OPTION_INTO), + ("FacetCounts.shard_key_selector", DEFAULT_OPTION_INTO), + // SearchMatrixPoints + ("SearchMatrixPoints.collection_name", PUBLIC_ONLY), + ("SearchMatrixPoints.filter", DEFAULT_OPTION_INTO), + ("SearchMatrixPoints.sample", DEFAULT_OPTION), + ("SearchMatrixPoints.limit", DEFAULT_OPTION), + ("SearchMatrixPoints.using", DEFAULT_OPTION_INTO), + ("SearchMatrixPoints.timeout", DEFAULT_OPTION), + ("SearchMatrixPoints.read_consistency", DEFAULT_OPTION_INTO), + ("SearchMatrixPoints.shard_key_selector", DEFAULT_OPTION_INTO), ], builder_derive_options(), ) @@ -1115,6 +1150,21 @@ fn builder_derive_options() -> &'static [BuildDeriveOptions] { NO_DEFAULT_BUILDER_DERIVE_OPTIONS, MacroConfig::WithDefaultFn, ), + ( + "StrictModeConfig", + DEFAULT_BUILDER_DERIVE_OPTIONS, + MacroConfig::DefaultImpl, + ), + ( + "FacetCounts", + NO_DEFAULT_BUILDER_DERIVE_OPTIONS, + MacroConfig::WithDefaultFn, + ), + ( + "SearchMatrixPoints", + NO_DEFAULT_BUILDER_DERIVE_OPTIONS, + MacroConfig::WithDefaultFn, + ), ] } From df1613a1a9502da1e0bbde89110a641d0b5edf75 Mon Sep 17 00:00:00 2001 From: jojii Date: Tue, 1 Oct 2024 15:07:27 +0200 Subject: [PATCH 2/8] add client functions --- src/qdrant_client/points.rs | 43 ++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/src/qdrant_client/points.rs b/src/qdrant_client/points.rs index 0075eb5..d3eb2f1 100644 --- a/src/qdrant_client/points.rs +++ b/src/qdrant_client/points.rs @@ -7,9 +7,10 @@ use tonic::Status; use crate::auth::TokenInterceptor; use crate::qdrant::points_client::PointsClient; use crate::qdrant::{ - CountPoints, CountResponse, DeletePointVectors, DeletePoints, GetPoints, GetResponse, - PointsOperationResponse, ScrollPoints, ScrollResponse, UpdateBatchPoints, UpdateBatchResponse, - UpdatePointVectors, UpsertPoints, + CountPoints, CountResponse, DeletePointVectors, DeletePoints, FacetCounts, FacetResponse, + GetPoints, GetResponse, PointsOperationResponse, ScrollPoints, ScrollResponse, + SearchMatrixOffsetsResponse, SearchMatrixPairsResponse, SearchMatrixPoints, UpdateBatchPoints, + UpdateBatchResponse, UpdatePointVectors, UpsertPoints, }; use crate::qdrant_client::{Qdrant, QdrantResult}; @@ -500,4 +501,40 @@ impl Qdrant { }) .await } + + pub async fn facet(&self, request: impl Into) -> QdrantResult { + let request = &request.into(); + + self.with_points_client(|mut points_api| async move { + let result = points_api.facet(request.clone()).await?; + Ok(result.into_inner()) + }) + .await + } + + pub async fn search_matrix_pairs( + &self, + request: impl Into, + ) -> QdrantResult { + let request = &request.into(); + + self.with_points_client(|mut points_api| async move { + let result = points_api.search_matrix_pairs(request.clone()).await?; + Ok(result.into_inner()) + }) + .await + } + + pub async fn search_matrix_offsets( + &self, + request: impl Into, + ) -> QdrantResult { + let request = &request.into(); + + self.with_points_client(|mut points_api| async move { + let result = points_api.search_matrix_offsets(request.clone()).await?; + Ok(result.into_inner()) + }) + .await + } } From 56f03c091385ea33412dc30c54c2d93dd8017b30 Mon Sep 17 00:00:00 2001 From: jojii Date: Tue, 1 Oct 2024 15:19:30 +0200 Subject: [PATCH 3/8] use new compile function --- tests/protos.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/protos.rs b/tests/protos.rs index 5cb5385..b8f057d 100644 --- a/tests/protos.rs +++ b/tests/protos.rs @@ -24,7 +24,7 @@ fn protos() { .configure_deprecations() .configure_derive_builder() .out_dir("src/") // saves generated structures at this location - .compile( + .compile_protos( &["proto/qdrant.proto"], // proto entry point &["proto"], // specify the root location to search proto dependencies ) From e5d933d4145b52847b47a024a6543c6976e7be16 Mon Sep 17 00:00:00 2001 From: jojii Date: Tue, 1 Oct 2024 15:22:05 +0200 Subject: [PATCH 4/8] recompile protos --- src/qdrant.rs | 796 ++++++++++++++++++-------------------------------- 1 file changed, 286 insertions(+), 510 deletions(-) diff --git a/src/qdrant.rs b/src/qdrant.rs index 0d771f4..b4f745a 100644 --- a/src/qdrant.rs +++ b/src/qdrant.rs @@ -5,7 +5,6 @@ pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct VectorParams { /// Size of the vectors @@ -48,7 +47,6 @@ pub struct VectorParams { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct VectorParamsDiff { /// Update params for HNSW index. If empty object - it will be unset @@ -70,13 +68,11 @@ pub struct VectorParamsDiff { #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] pub on_disk: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VectorParamsMap { #[prost(map = "string, message", tag = "1")] pub map: ::std::collections::HashMap<::prost::alloc::string::String, VectorParams>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VectorParamsDiffMap { #[prost(map = "string, message", tag = "1")] @@ -85,7 +81,6 @@ pub struct VectorParamsDiffMap { VectorParamsDiff, >, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VectorsConfig { #[prost(oneof = "vectors_config::Config", tags = "1, 2")] @@ -93,7 +88,6 @@ pub struct VectorsConfig { } /// Nested message and enum types in `VectorsConfig`. pub mod vectors_config { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Config { #[prost(message, tag = "1")] @@ -102,7 +96,6 @@ pub mod vectors_config { ParamsMap(super::VectorParamsMap), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VectorsConfigDiff { #[prost(oneof = "vectors_config_diff::Config", tags = "1, 2")] @@ -110,7 +103,6 @@ pub struct VectorsConfigDiff { } /// Nested message and enum types in `VectorsConfigDiff`. pub mod vectors_config_diff { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Config { #[prost(message, tag = "1")] @@ -124,7 +116,6 @@ pub mod vectors_config_diff { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SparseVectorParams { /// Configuration of sparse index @@ -136,7 +127,6 @@ pub struct SparseVectorParams { #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] pub modifier: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SparseVectorConfig { #[prost(map = "string, message", tag = "1")] @@ -151,7 +141,6 @@ pub struct SparseVectorConfig { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MultiVectorConfig { /// Comparator for multi-vector search @@ -159,26 +148,22 @@ pub struct MultiVectorConfig { #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] pub comparator: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetCollectionInfoRequest { /// Name of the collection #[prost(string, tag = "1")] pub collection_name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionExistsRequest { #[prost(string, tag = "1")] pub collection_name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct CollectionExists { #[prost(bool, tag = "1")] pub exists: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct CollectionExistsResponse { #[prost(message, optional, tag = "1")] @@ -187,17 +172,14 @@ pub struct CollectionExistsResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ListCollectionsRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionDescription { /// Name of the collection #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetCollectionInfoResponse { #[prost(message, optional, tag = "1")] @@ -206,7 +188,6 @@ pub struct GetCollectionInfoResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListCollectionsResponse { #[prost(message, repeated, tag = "1")] @@ -215,7 +196,6 @@ pub struct ListCollectionsResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OptimizerStatus { #[prost(bool, tag = "1")] @@ -228,7 +208,6 @@ pub struct OptimizerStatus { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct HnswConfigDiff { /// @@ -273,7 +252,6 @@ pub struct HnswConfigDiff { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SparseIndexConfig { /// @@ -298,7 +276,6 @@ pub struct SparseIndexConfig { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct WalConfigDiff { /// Size of a single WAL block file @@ -315,7 +292,6 @@ pub struct WalConfigDiff { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct OptimizersConfigDiff { /// @@ -395,7 +371,6 @@ pub struct OptimizersConfigDiff { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ScalarQuantization { /// Type of quantization @@ -417,7 +392,6 @@ pub struct ScalarQuantization { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ProductQuantization { /// Compression ratio @@ -435,7 +409,6 @@ pub struct ProductQuantization { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct BinaryQuantization { /// If true - quantized vectors always will be stored in RAM, ignoring the config of main storage @@ -443,7 +416,6 @@ pub struct BinaryQuantization { #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] pub always_ram: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct QuantizationConfig { #[prost(oneof = "quantization_config::Quantization", tags = "1, 2, 3")] @@ -451,7 +423,6 @@ pub struct QuantizationConfig { } /// Nested message and enum types in `QuantizationConfig`. pub mod quantization_config { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum Quantization { #[prost(message, tag = "1")] @@ -462,10 +433,8 @@ pub mod quantization_config { Binary(super::BinaryQuantization), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Disabled {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct QuantizationConfigDiff { #[prost(oneof = "quantization_config_diff::Quantization", tags = "1, 2, 3, 4")] @@ -473,7 +442,6 @@ pub struct QuantizationConfigDiff { } /// Nested message and enum types in `QuantizationConfigDiff`. pub mod quantization_config_diff { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum Quantization { #[prost(message, tag = "1")] @@ -491,7 +459,6 @@ pub mod quantization_config_diff { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct StrictModeConfig { #[prost(bool, optional, tag = "1")] @@ -524,7 +491,6 @@ pub struct StrictModeConfig { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateCollection { /// Name of the collection @@ -600,7 +566,6 @@ pub struct CreateCollection { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateCollection { /// Name of the collection @@ -648,7 +613,6 @@ pub struct UpdateCollection { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteCollection { /// Name of the collection @@ -660,7 +624,6 @@ pub struct DeleteCollection { #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] pub timeout: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct CollectionOperationResponse { /// if operation made changes @@ -670,7 +633,6 @@ pub struct CollectionOperationResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionParams { /// Number of shards in collection @@ -703,7 +665,6 @@ pub struct CollectionParams { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct CollectionParamsDiff { /// Number of replicas of each shard that network tries to maintain @@ -723,7 +684,6 @@ pub struct CollectionParamsDiff { #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] pub read_fan_out_factor: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionConfig { /// Collection parameters @@ -750,7 +710,6 @@ pub struct CollectionConfig { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct KeywordIndexParams { /// If true - used for tenant optimization. @@ -768,7 +727,6 @@ pub struct KeywordIndexParams { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct IntegerIndexParams { /// If true - support direct lookups. @@ -793,7 +751,6 @@ pub struct IntegerIndexParams { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct FloatIndexParams { /// If true - store index on disk. @@ -805,7 +762,6 @@ pub struct FloatIndexParams { #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] pub is_principal: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GeoIndexParams {} #[derive(derive_builder::Builder)] @@ -814,7 +770,6 @@ pub struct GeoIndexParams {} pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct TextIndexParams { /// Tokenizer type @@ -838,7 +793,6 @@ pub struct TextIndexParams { #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] pub on_disk: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct BoolIndexParams {} #[derive(derive_builder::Builder)] @@ -846,7 +800,6 @@ pub struct BoolIndexParams {} build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct DatetimeIndexParams { /// If true - store index on disk. @@ -863,7 +816,6 @@ pub struct DatetimeIndexParams { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct UuidIndexParams { /// If true - used for tenant optimization. @@ -875,7 +827,6 @@ pub struct UuidIndexParams { #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] pub on_disk: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PayloadIndexParams { #[prost( @@ -886,7 +837,6 @@ pub struct PayloadIndexParams { } /// Nested message and enum types in `PayloadIndexParams`. pub mod payload_index_params { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum IndexParams { /// Parameters for keyword index @@ -915,7 +865,6 @@ pub mod payload_index_params { UuidIndexParams(super::UuidIndexParams), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PayloadSchemaInfo { /// Field data type @@ -928,7 +877,6 @@ pub struct PayloadSchemaInfo { #[prost(uint64, optional, tag = "3")] pub points: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionInfo { /// operating condition of the collection @@ -959,7 +907,6 @@ pub struct CollectionInfo { #[prost(uint64, optional, tag = "10")] pub indexed_vectors_count: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChangeAliases { /// List of actions @@ -969,7 +916,6 @@ pub struct ChangeAliases { #[prost(uint64, optional, tag = "2")] pub timeout: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AliasOperations { #[prost(oneof = "alias_operations::Action", tags = "1, 2, 3")] @@ -977,7 +923,6 @@ pub struct AliasOperations { } /// Nested message and enum types in `AliasOperations`. pub mod alias_operations { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Action { #[prost(message, tag = "1")] @@ -994,7 +939,6 @@ pub mod alias_operations { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateAlias { /// Name of the collection @@ -1012,7 +956,6 @@ pub struct CreateAlias { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RenameAlias { /// Name of the alias to rename @@ -1024,24 +967,20 @@ pub struct RenameAlias { #[builder(field(vis = "pub(crate)"))] pub new_alias_name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteAlias { /// Name of the alias #[prost(string, tag = "1")] pub alias_name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ListAliasesRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListCollectionAliasesRequest { /// Name of the collection #[prost(string, tag = "1")] pub collection_name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AliasDescription { /// Name of the alias @@ -1051,7 +990,6 @@ pub struct AliasDescription { #[prost(string, tag = "2")] pub collection_name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListAliasesResponse { #[prost(message, repeated, tag = "1")] @@ -1060,14 +998,12 @@ pub struct ListAliasesResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionClusterInfoRequest { /// Name of the collection #[prost(string, tag = "1")] pub collection_name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ShardKey { #[prost(oneof = "shard_key::Key", tags = "1, 2")] @@ -1075,7 +1011,6 @@ pub struct ShardKey { } /// Nested message and enum types in `ShardKey`. pub mod shard_key { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Key { /// String key @@ -1086,7 +1021,6 @@ pub mod shard_key { Number(u64), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LocalShardInfo { /// Local shard id @@ -1102,7 +1036,6 @@ pub struct LocalShardInfo { #[prost(message, optional, tag = "4")] pub shard_key: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RemoteShardInfo { /// Local shard id @@ -1118,7 +1051,6 @@ pub struct RemoteShardInfo { #[prost(message, optional, tag = "4")] pub shard_key: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ShardTransferInfo { /// Local shard id @@ -1134,7 +1066,6 @@ pub struct ShardTransferInfo { #[prost(bool, tag = "4")] pub sync: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReshardingInfo { #[prost(uint32, tag = "1")] @@ -1144,7 +1075,6 @@ pub struct ReshardingInfo { #[prost(message, optional, tag = "3")] pub shard_key: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionClusterInfoResponse { /// ID of this peer @@ -1169,7 +1099,6 @@ pub struct CollectionClusterInfoResponse { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MoveShard { /// Local shard id @@ -1195,7 +1124,6 @@ pub struct MoveShard { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ReplicateShard { /// Local shard id @@ -1221,7 +1149,6 @@ pub struct ReplicateShard { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct AbortShardTransfer { /// Local shard id @@ -1238,7 +1165,6 @@ pub struct AbortShardTransfer { #[builder(field(vis = "pub(crate)"))] pub to_peer_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RestartTransfer { /// Local shard id @@ -1259,7 +1185,6 @@ pub struct RestartTransfer { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Replica { #[prost(uint32, tag = "1")] @@ -1274,7 +1199,6 @@ pub struct Replica { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateShardKey { /// User-defined shard key @@ -1294,7 +1218,6 @@ pub struct CreateShardKey { #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] pub placement: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteShardKey { /// Shard key to delete @@ -1307,7 +1230,6 @@ pub struct DeleteShardKey { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateCollectionClusterSetupRequest { /// Name of the collection @@ -1329,7 +1251,6 @@ pub struct UpdateCollectionClusterSetupRequest { } /// Nested message and enum types in `UpdateCollectionClusterSetupRequest`. pub mod update_collection_cluster_setup_request { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Operation { #[prost(message, tag = "2")] @@ -1348,7 +1269,6 @@ pub mod update_collection_cluster_setup_request { RestartTransfer(super::RestartTransfer), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct UpdateCollectionClusterSetupResponse { #[prost(bool, tag = "1")] @@ -1360,7 +1280,6 @@ pub struct UpdateCollectionClusterSetupResponse { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateShardKeyRequest { /// Name of the collection @@ -1382,7 +1301,6 @@ pub struct CreateShardKeyRequest { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteShardKeyRequest { /// Name of the collection @@ -1398,13 +1316,11 @@ pub struct DeleteShardKeyRequest { #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] pub timeout: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct CreateShardKeyResponse { #[prost(bool, tag = "1")] pub result: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct DeleteShardKeyResponse { #[prost(bool, tag = "1")] @@ -1425,10 +1341,10 @@ impl Datatype { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Datatype::Default => "Default", - Datatype::Float32 => "Float32", - Datatype::Uint8 => "Uint8", - Datatype::Float16 => "Float16", + Self::Default => "Default", + Self::Float32 => "Float32", + Self::Uint8 => "Uint8", + Self::Float16 => "Float16", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1456,8 +1372,8 @@ impl Modifier { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Modifier::None => "None", - Modifier::Idf => "Idf", + Self::None => "None", + Self::Idf => "Idf", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1481,7 +1397,7 @@ impl MultiVectorComparator { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - MultiVectorComparator::MaxSim => "MaxSim", + Self::MaxSim => "MaxSim", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1508,11 +1424,11 @@ impl Distance { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Distance::UnknownDistance => "UnknownDistance", - Distance::Cosine => "Cosine", - Distance::Euclid => "Euclid", - Distance::Dot => "Dot", - Distance::Manhattan => "Manhattan", + Self::UnknownDistance => "UnknownDistance", + Self::Cosine => "Cosine", + Self::Euclid => "Euclid", + Self::Dot => "Dot", + Self::Manhattan => "Manhattan", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1547,11 +1463,11 @@ impl CollectionStatus { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - CollectionStatus::UnknownCollectionStatus => "UnknownCollectionStatus", - CollectionStatus::Green => "Green", - CollectionStatus::Yellow => "Yellow", - CollectionStatus::Red => "Red", - CollectionStatus::Grey => "Grey", + Self::UnknownCollectionStatus => "UnknownCollectionStatus", + Self::Green => "Green", + Self::Yellow => "Yellow", + Self::Red => "Red", + Self::Grey => "Grey", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1586,15 +1502,15 @@ impl PayloadSchemaType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - PayloadSchemaType::UnknownType => "UnknownType", - PayloadSchemaType::Keyword => "Keyword", - PayloadSchemaType::Integer => "Integer", - PayloadSchemaType::Float => "Float", - PayloadSchemaType::Geo => "Geo", - PayloadSchemaType::Text => "Text", - PayloadSchemaType::Bool => "Bool", - PayloadSchemaType::Datetime => "Datetime", - PayloadSchemaType::Uuid => "Uuid", + Self::UnknownType => "UnknownType", + Self::Keyword => "Keyword", + Self::Integer => "Integer", + Self::Float => "Float", + Self::Geo => "Geo", + Self::Text => "Text", + Self::Bool => "Bool", + Self::Datetime => "Datetime", + Self::Uuid => "Uuid", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1626,8 +1542,8 @@ impl QuantizationType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - QuantizationType::UnknownQuantization => "UnknownQuantization", - QuantizationType::Int8 => "Int8", + Self::UnknownQuantization => "UnknownQuantization", + Self::Int8 => "Int8", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1655,11 +1571,11 @@ impl CompressionRatio { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - CompressionRatio::X4 => "x4", - CompressionRatio::X8 => "x8", - CompressionRatio::X16 => "x16", - CompressionRatio::X32 => "x32", - CompressionRatio::X64 => "x64", + Self::X4 => "x4", + Self::X8 => "x8", + Self::X16 => "x16", + Self::X32 => "x32", + Self::X64 => "x64", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1689,8 +1605,8 @@ impl ShardingMethod { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ShardingMethod::Auto => "Auto", - ShardingMethod::Custom => "Custom", + Self::Auto => "Auto", + Self::Custom => "Custom", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1718,11 +1634,11 @@ impl TokenizerType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - TokenizerType::Unknown => "Unknown", - TokenizerType::Prefix => "Prefix", - TokenizerType::Whitespace => "Whitespace", - TokenizerType::Word => "Word", - TokenizerType::Multilingual => "Multilingual", + Self::Unknown => "Unknown", + Self::Prefix => "Prefix", + Self::Whitespace => "Whitespace", + Self::Word => "Word", + Self::Multilingual => "Multilingual", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1764,14 +1680,14 @@ impl ReplicaState { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ReplicaState::Active => "Active", - ReplicaState::Dead => "Dead", - ReplicaState::Partial => "Partial", - ReplicaState::Initializing => "Initializing", - ReplicaState::Listener => "Listener", - ReplicaState::PartialSnapshot => "PartialSnapshot", - ReplicaState::Recovery => "Recovery", - ReplicaState::Resharding => "Resharding", + Self::Active => "Active", + Self::Dead => "Dead", + Self::Partial => "Partial", + Self::Initializing => "Initializing", + Self::Listener => "Listener", + Self::PartialSnapshot => "PartialSnapshot", + Self::Recovery => "Recovery", + Self::Resharding => "Resharding", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1808,10 +1724,10 @@ impl ShardTransferMethod { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ShardTransferMethod::StreamRecords => "StreamRecords", - ShardTransferMethod::Snapshot => "Snapshot", - ShardTransferMethod::WalDelta => "WalDelta", - ShardTransferMethod::ReshardingStreamRecords => "ReshardingStreamRecords", + Self::StreamRecords => "StreamRecords", + Self::Snapshot => "Snapshot", + Self::WalDelta => "WalDelta", + Self::ReshardingStreamRecords => "ReshardingStreamRecords", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1827,7 +1743,13 @@ impl ShardTransferMethod { } /// Generated client implementations. pub mod collections_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -1849,8 +1771,8 @@ pub mod collections_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -1875,7 +1797,7 @@ pub mod collections_client { >, , - >>::Error: Into + Send + Sync, + >>::Error: Into + std::marker::Send + std::marker::Sync, { CollectionsClient::new(InterceptedService::new(inner, interceptor)) } @@ -1923,8 +1845,7 @@ pub mod collections_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -1947,8 +1868,7 @@ pub mod collections_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -1971,8 +1891,7 @@ pub mod collections_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -1997,8 +1916,7 @@ pub mod collections_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -2023,8 +1941,7 @@ pub mod collections_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -2049,8 +1966,7 @@ pub mod collections_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -2076,8 +1992,7 @@ pub mod collections_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -2103,8 +2018,7 @@ pub mod collections_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -2130,8 +2044,7 @@ pub mod collections_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -2157,8 +2070,7 @@ pub mod collections_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -2184,8 +2096,7 @@ pub mod collections_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -2213,8 +2124,7 @@ pub mod collections_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -2240,8 +2150,7 @@ pub mod collections_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -2258,11 +2167,17 @@ pub mod collections_client { } /// Generated server implementations. pub mod collections_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with CollectionsServer. #[async_trait] - pub trait Collections: Send + Sync + 'static { + pub trait Collections: std::marker::Send + std::marker::Sync + 'static { /// /// Get detailed information about specified existing collection async fn get( @@ -2382,14 +2297,14 @@ pub mod collections_server { >; } #[derive(Debug)] - pub struct CollectionsServer { + pub struct CollectionsServer { inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - impl CollectionsServer { + impl CollectionsServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -2443,8 +2358,8 @@ pub mod collections_server { impl tonic::codegen::Service> for CollectionsServer where T: Collections, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -3053,23 +2968,25 @@ pub mod collections_server { } _ => { Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", tonic::Code::Unimplemented as i32) - .header( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ) - .body(empty_body()) - .unwrap(), - ) + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) }) } } } } - impl Clone for CollectionsServer { + impl Clone for CollectionsServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -3081,8 +2998,10 @@ pub mod collections_server { } } } - impl tonic::server::NamedService for CollectionsServer { - const NAME: &'static str = "qdrant.Collections"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "qdrant.Collections"; + impl tonic::server::NamedService for CollectionsServer { + const NAME: &'static str = SERVICE_NAME; } } /// `Struct` represents a structured data value, consisting of fields @@ -3093,7 +3012,6 @@ pub mod collections_server { /// with the proto support for the language. /// /// The JSON representation for `Struct` is a JSON object. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Struct { /// Unordered map of dynamically typed values. @@ -3106,7 +3024,6 @@ pub struct Struct { /// variants, absence of any variant indicates an error. /// /// The JSON representation for `Value` is a JSON value. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Value { /// The kind of value. @@ -3116,7 +3033,6 @@ pub struct Value { /// Nested message and enum types in `Value`. pub mod value { /// The kind of value. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Kind { /// Represents a null value. @@ -3145,7 +3061,6 @@ pub mod value { /// `ListValue` is a wrapper around a repeated field of values. /// /// The JSON representation for `ListValue` is a JSON array. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListValue { /// Repeated field of dynamically typed values. @@ -3169,7 +3084,7 @@ impl NullValue { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - NullValue::NullValue => "NULL_VALUE", + Self::NullValue => "NULL_VALUE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3180,14 +3095,12 @@ impl NullValue { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct WriteOrdering { /// Write ordering guarantees #[prost(enumeration = "WriteOrderingType", tag = "1")] pub r#type: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ReadConsistency { #[prost(oneof = "read_consistency::Value", tags = "1, 2")] @@ -3195,7 +3108,6 @@ pub struct ReadConsistency { } /// Nested message and enum types in `ReadConsistency`. pub mod read_consistency { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum Value { /// Common read consistency configurations @@ -3206,7 +3118,6 @@ pub mod read_consistency { Factor(u64), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PointId { #[prost(oneof = "point_id::PointIdOptions", tags = "1, 2")] @@ -3214,7 +3125,6 @@ pub struct PointId { } /// Nested message and enum types in `PointId`. pub mod point_id { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum PointIdOptions { /// Numerical ID of the point @@ -3225,14 +3135,12 @@ pub mod point_id { Uuid(::prost::alloc::string::String), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SparseIndices { #[prost(uint32, repeated, tag = "1")] pub data: ::prost::alloc::vec::Vec, } /// Legacy vector format, which determines the vector type by the configuration of its fields. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Vector { /// Vector data (flatten for multi vectors) @@ -3245,13 +3153,11 @@ pub struct Vector { #[prost(uint32, optional, tag = "3")] pub vectors_count: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DenseVector { #[prost(float, repeated, tag = "1")] pub data: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SparseVector { #[prost(float, repeated, tag = "1")] @@ -3259,14 +3165,12 @@ pub struct SparseVector { #[prost(uint32, repeated, tag = "2")] pub indices: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MultiDenseVector { #[prost(message, repeated, tag = "1")] pub vectors: ::prost::alloc::vec::Vec, } /// Vector type to be used in queries. Ids will be substituted with their corresponding vectors from the collection. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VectorInput { #[prost(oneof = "vector_input::Variant", tags = "1, 2, 3, 4")] @@ -3274,7 +3178,6 @@ pub struct VectorInput { } /// Nested message and enum types in `VectorInput`. pub mod vector_input { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Variant { #[prost(message, tag = "1")] @@ -3287,7 +3190,6 @@ pub mod vector_input { MultiDense(super::MultiDenseVector), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ShardKeySelector { /// List of shard keys which should be used in the request @@ -3300,7 +3202,6 @@ pub struct ShardKeySelector { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpsertPoints { /// name of the collection @@ -3329,7 +3230,6 @@ pub struct UpsertPoints { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeletePoints { /// name of the collection @@ -3365,7 +3265,6 @@ pub struct DeletePoints { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetPoints { /// name of the collection @@ -3421,7 +3320,6 @@ pub struct GetPoints { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdatePointVectors { /// name of the collection @@ -3445,7 +3343,6 @@ pub struct UpdatePointVectors { #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] pub shard_key_selector: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PointVectors { /// ID to update vectors for @@ -3461,7 +3358,6 @@ pub struct PointVectors { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeletePointVectors { /// name of the collection @@ -3501,7 +3397,6 @@ pub struct DeletePointVectors { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetPayloadPoints { /// name of the collection @@ -3545,7 +3440,6 @@ pub struct SetPayloadPoints { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeletePayloadPoints { /// name of the collection @@ -3585,7 +3479,6 @@ pub struct DeletePayloadPoints { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClearPayloadPoints { /// name of the collection @@ -3621,7 +3514,6 @@ pub struct ClearPayloadPoints { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateFieldIndexCollection { /// name of the collection @@ -3661,7 +3553,6 @@ pub struct CreateFieldIndexCollection { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteFieldIndexCollection { /// name of the collection @@ -3681,21 +3572,18 @@ pub struct DeleteFieldIndexCollection { #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] pub ordering: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PayloadIncludeSelector { /// List of payload keys to include into result #[prost(string, repeated, tag = "1")] pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PayloadExcludeSelector { /// List of payload keys to exclude from the result #[prost(string, repeated, tag = "1")] pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WithPayloadSelector { #[prost(oneof = "with_payload_selector::SelectorOptions", tags = "1, 2, 3")] @@ -3703,7 +3591,6 @@ pub struct WithPayloadSelector { } /// Nested message and enum types in `WithPayloadSelector`. pub mod with_payload_selector { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum SelectorOptions { /// If `true` - return all payload, if `false` - none @@ -3715,13 +3602,11 @@ pub mod with_payload_selector { Exclude(super::PayloadExcludeSelector), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct NamedVectors { #[prost(map = "string, message", tag = "1")] pub vectors: ::std::collections::HashMap<::prost::alloc::string::String, Vector>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Vectors { #[prost(oneof = "vectors::VectorsOptions", tags = "1, 2")] @@ -3729,7 +3614,6 @@ pub struct Vectors { } /// Nested message and enum types in `Vectors`. pub mod vectors { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum VectorsOptions { #[prost(message, tag = "1")] @@ -3738,14 +3622,12 @@ pub mod vectors { Vectors(super::NamedVectors), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VectorsSelector { /// List of vectors to include into result #[prost(string, repeated, tag = "1")] pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WithVectorsSelector { #[prost(oneof = "with_vectors_selector::SelectorOptions", tags = "1, 2")] @@ -3753,7 +3635,6 @@ pub struct WithVectorsSelector { } /// Nested message and enum types in `WithVectorsSelector`. pub mod with_vectors_selector { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum SelectorOptions { /// If `true` - return all vectors, if `false` - none @@ -3769,7 +3650,6 @@ pub mod with_vectors_selector { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct QuantizationSearchParams { /// @@ -3799,7 +3679,6 @@ pub struct QuantizationSearchParams { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SearchParams { /// @@ -3832,7 +3711,6 @@ pub struct SearchParams { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchPoints { /// name of the collection @@ -3915,7 +3793,6 @@ pub struct SearchPoints { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchBatchPoints { /// Name of the collection @@ -3946,7 +3823,6 @@ pub struct SearchBatchPoints { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WithLookup { /// Name of the collection to use for points lookup @@ -3980,7 +3856,6 @@ pub struct WithLookup { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchPointGroups { /// Name of the collection @@ -4065,7 +3940,6 @@ pub struct SearchPointGroups { #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] pub sparse_indices: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StartFrom { #[prost(oneof = "start_from::Value", tags = "1, 2, 3, 4")] @@ -4073,7 +3947,6 @@ pub struct StartFrom { } /// Nested message and enum types in `StartFrom`. pub mod start_from { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Value { #[prost(double, tag = "1")] @@ -4092,7 +3965,6 @@ pub mod start_from { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OrderBy { /// Payload key to order by @@ -4120,7 +3992,6 @@ pub struct OrderBy { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScrollPoints { #[prost(string, tag = "1")] @@ -4187,7 +4058,6 @@ pub struct ScrollPoints { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LookupLocation { #[prost(string, tag = "1")] @@ -4208,7 +4078,6 @@ pub struct LookupLocation { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RecommendPoints { /// name of the collection @@ -4308,7 +4177,6 @@ pub struct RecommendPoints { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RecommendBatchPoints { /// Name of the collection @@ -4339,7 +4207,6 @@ pub struct RecommendBatchPoints { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RecommendPointGroups { /// Name of the collection @@ -4441,7 +4308,6 @@ pub struct RecommendPointGroups { #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] pub shard_key_selector: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TargetVector { #[prost(oneof = "target_vector::Target", tags = "1")] @@ -4449,14 +4315,12 @@ pub struct TargetVector { } /// Nested message and enum types in `TargetVector`. pub mod target_vector { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Target { #[prost(message, tag = "1")] Single(super::VectorExample), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VectorExample { #[prost(oneof = "vector_example::Example", tags = "1, 2")] @@ -4464,7 +4328,6 @@ pub struct VectorExample { } /// Nested message and enum types in `VectorExample`. pub mod vector_example { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Example { #[prost(message, tag = "1")] @@ -4478,7 +4341,6 @@ pub mod vector_example { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ContextExamplePair { #[prost(message, optional, tag = "1")] @@ -4494,7 +4356,6 @@ pub struct ContextExamplePair { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DiscoverPoints { /// name of the collection @@ -4578,7 +4439,6 @@ pub struct DiscoverPoints { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DiscoverBatchPoints { /// Name of the collection @@ -4609,7 +4469,6 @@ pub struct DiscoverBatchPoints { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CountPoints { /// Name of the collection @@ -4648,7 +4507,6 @@ pub struct CountPoints { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RecommendInput { /// Look for vectors closest to the vectors from these points @@ -4670,7 +4528,6 @@ pub struct RecommendInput { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ContextInputPair { /// A positive vector @@ -4688,7 +4545,6 @@ pub struct ContextInputPair { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DiscoverInput { /// Use this as the primary search objective @@ -4705,7 +4561,6 @@ pub struct DiscoverInput { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ContextInput { /// Search space will be constrained by these pairs of vectors @@ -4713,7 +4568,6 @@ pub struct ContextInput { #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] pub pairs: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Query { #[prost(oneof = "query::Variant", tags = "1, 2, 3, 4, 5, 6, 7")] @@ -4721,7 +4575,6 @@ pub struct Query { } /// Nested message and enum types in `Query`. pub mod query { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Variant { /// Find the nearest neighbors to this vector. @@ -4752,7 +4605,6 @@ pub mod query { build_fn(private, error = "std::convert::Infallible", name = "build_inner"), pattern = "owned" )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrefetchQuery { /// Sub-requests to perform first. If present, the query will be performed on the results of the prefetches. @@ -4794,7 +4646,6 @@ pub struct PrefetchQuery { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryPoints { /// Name of the collection @@ -4882,7 +4733,6 @@ pub struct QueryPoints { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryBatchPoints { #[prost(string, tag = "1")] @@ -4912,7 +4762,6 @@ pub struct QueryBatchPoints { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryPointGroups { /// Name of the collection @@ -4990,7 +4839,6 @@ pub struct QueryPointGroups { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FacetCounts { /// Name of the collection @@ -5026,7 +4874,6 @@ pub struct FacetCounts { #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] pub shard_key_selector: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FacetValue { #[prost(oneof = "facet_value::Variant", tags = "1, 2, 3")] @@ -5034,7 +4881,6 @@ pub struct FacetValue { } /// Nested message and enum types in `FacetValue`. pub mod facet_value { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Variant { /// String value from the facet @@ -5048,7 +4894,6 @@ pub mod facet_value { BoolValue(bool), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FacetHit { /// Value from the facet @@ -5064,7 +4909,6 @@ pub struct FacetHit { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchMatrixPoints { /// Name of the collection @@ -5100,14 +4944,12 @@ pub struct SearchMatrixPoints { #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] pub shard_key_selector: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchMatrixPairs { /// List of pairs of points with scores #[prost(message, repeated, tag = "1")] pub pairs: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchMatrixPair { /// first id of the pair @@ -5120,7 +4962,6 @@ pub struct SearchMatrixPair { #[prost(float, tag = "3")] pub score: f32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchMatrixOffsets { /// Row indices of the matrix @@ -5136,7 +4977,6 @@ pub struct SearchMatrixOffsets { #[prost(message, repeated, tag = "4")] pub ids: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PointsUpdateOperation { #[prost( @@ -5147,7 +4987,6 @@ pub struct PointsUpdateOperation { } /// Nested message and enum types in `PointsUpdateOperation`. pub mod points_update_operation { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PointStructList { #[prost(message, repeated, tag = "1")] @@ -5156,7 +4995,6 @@ pub mod points_update_operation { #[prost(message, optional, tag = "2")] pub shard_key_selector: ::core::option::Option, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetPayload { #[prost(map = "string, message", tag = "1")] @@ -5174,7 +5012,6 @@ pub mod points_update_operation { #[prost(string, optional, tag = "4")] pub key: ::core::option::Option<::prost::alloc::string::String>, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OverwritePayload { #[prost(map = "string, message", tag = "1")] @@ -5192,7 +5029,6 @@ pub mod points_update_operation { #[prost(string, optional, tag = "4")] pub key: ::core::option::Option<::prost::alloc::string::String>, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeletePayload { #[prost(string, repeated, tag = "1")] @@ -5204,7 +5040,6 @@ pub mod points_update_operation { #[prost(message, optional, tag = "3")] pub shard_key_selector: ::core::option::Option, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateVectors { /// List of points and vectors to update @@ -5214,7 +5049,6 @@ pub mod points_update_operation { #[prost(message, optional, tag = "2")] pub shard_key_selector: ::core::option::Option, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteVectors { /// Affected points @@ -5227,7 +5061,6 @@ pub mod points_update_operation { #[prost(message, optional, tag = "3")] pub shard_key_selector: ::core::option::Option, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeletePoints { /// Affected points @@ -5237,7 +5070,6 @@ pub mod points_update_operation { #[prost(message, optional, tag = "2")] pub shard_key_selector: ::core::option::Option, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClearPayload { /// Affected points @@ -5247,7 +5079,6 @@ pub mod points_update_operation { #[prost(message, optional, tag = "2")] pub shard_key_selector: ::core::option::Option, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Operation { #[prost(message, tag = "1")] @@ -5280,7 +5111,6 @@ pub mod points_update_operation { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateBatchPoints { /// name of the collection @@ -5299,7 +5129,6 @@ pub struct UpdateBatchPoints { #[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))] pub ordering: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PointsOperationResponse { #[prost(message, optional, tag = "1")] @@ -5308,7 +5137,6 @@ pub struct PointsOperationResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct UpdateResult { /// Number of operation @@ -5318,7 +5146,6 @@ pub struct UpdateResult { #[prost(enumeration = "UpdateStatus", tag = "2")] pub status: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct OrderValue { #[prost(oneof = "order_value::Variant", tags = "1, 2")] @@ -5326,7 +5153,6 @@ pub struct OrderValue { } /// Nested message and enum types in `OrderValue`. pub mod order_value { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum Variant { #[prost(int64, tag = "1")] @@ -5335,7 +5161,6 @@ pub mod order_value { Float(f64), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScoredPoint { /// Point id @@ -5360,7 +5185,6 @@ pub struct ScoredPoint { #[prost(message, optional, tag = "8")] pub order_value: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GroupId { #[prost(oneof = "group_id::Kind", tags = "1, 2, 3")] @@ -5368,7 +5192,6 @@ pub struct GroupId { } /// Nested message and enum types in `GroupId`. pub mod group_id { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Kind { /// Represents a double value. @@ -5382,7 +5205,6 @@ pub mod group_id { StringValue(::prost::alloc::string::String), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PointGroup { /// Group id @@ -5395,14 +5217,12 @@ pub struct PointGroup { #[prost(message, optional, tag = "3")] pub lookup: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GroupsResult { /// Groups #[prost(message, repeated, tag = "1")] pub groups: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchResponse { #[prost(message, repeated, tag = "1")] @@ -5411,7 +5231,6 @@ pub struct SearchResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryResponse { #[prost(message, repeated, tag = "1")] @@ -5420,7 +5239,6 @@ pub struct QueryResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryBatchResponse { #[prost(message, repeated, tag = "1")] @@ -5429,7 +5247,6 @@ pub struct QueryBatchResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryGroupsResponse { #[prost(message, optional, tag = "1")] @@ -5438,13 +5255,11 @@ pub struct QueryGroupsResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchResult { #[prost(message, repeated, tag = "1")] pub result: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchBatchResponse { #[prost(message, repeated, tag = "1")] @@ -5453,7 +5268,6 @@ pub struct SearchBatchResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchGroupsResponse { #[prost(message, optional, tag = "1")] @@ -5462,7 +5276,6 @@ pub struct SearchGroupsResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct CountResponse { #[prost(message, optional, tag = "1")] @@ -5471,7 +5284,6 @@ pub struct CountResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScrollResponse { /// Use this offset for the next query @@ -5483,13 +5295,11 @@ pub struct ScrollResponse { #[prost(double, tag = "3")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct CountResult { #[prost(uint64, tag = "1")] pub count: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RetrievedPoint { #[prost(message, optional, tag = "1")] @@ -5505,7 +5315,6 @@ pub struct RetrievedPoint { #[prost(message, optional, tag = "6")] pub order_value: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetResponse { #[prost(message, repeated, tag = "1")] @@ -5514,7 +5323,6 @@ pub struct GetResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RecommendResponse { #[prost(message, repeated, tag = "1")] @@ -5523,7 +5331,6 @@ pub struct RecommendResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RecommendBatchResponse { #[prost(message, repeated, tag = "1")] @@ -5532,7 +5339,6 @@ pub struct RecommendBatchResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DiscoverResponse { #[prost(message, repeated, tag = "1")] @@ -5541,7 +5347,6 @@ pub struct DiscoverResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DiscoverBatchResponse { #[prost(message, repeated, tag = "1")] @@ -5550,7 +5355,6 @@ pub struct DiscoverBatchResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RecommendGroupsResponse { #[prost(message, optional, tag = "1")] @@ -5559,7 +5363,6 @@ pub struct RecommendGroupsResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateBatchResponse { #[prost(message, repeated, tag = "1")] @@ -5568,7 +5371,6 @@ pub struct UpdateBatchResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FacetResponse { #[prost(message, repeated, tag = "1")] @@ -5577,7 +5379,6 @@ pub struct FacetResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchMatrixPairsResponse { #[prost(message, optional, tag = "1")] @@ -5586,7 +5387,6 @@ pub struct SearchMatrixPairsResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchMatrixOffsetsResponse { #[prost(message, optional, tag = "1")] @@ -5595,7 +5395,6 @@ pub struct SearchMatrixOffsetsResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Filter { /// At least one of those conditions should match @@ -5611,7 +5410,6 @@ pub struct Filter { #[prost(message, optional, tag = "4")] pub min_should: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MinShould { #[prost(message, repeated, tag = "1")] @@ -5619,7 +5417,6 @@ pub struct MinShould { #[prost(uint64, tag = "2")] pub min_count: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Condition { #[prost(oneof = "condition::ConditionOneOf", tags = "1, 2, 3, 4, 5, 6")] @@ -5627,7 +5424,6 @@ pub struct Condition { } /// Nested message and enum types in `Condition`. pub mod condition { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum ConditionOneOf { #[prost(message, tag = "1")] @@ -5644,25 +5440,21 @@ pub mod condition { Nested(super::NestedCondition), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IsEmptyCondition { #[prost(string, tag = "1")] pub key: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IsNullCondition { #[prost(string, tag = "1")] pub key: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HasIdCondition { #[prost(message, repeated, tag = "1")] pub has_id: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct NestedCondition { /// Path to nested object @@ -5672,7 +5464,6 @@ pub struct NestedCondition { #[prost(message, optional, tag = "2")] pub filter: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FieldCondition { #[prost(string, tag = "1")] @@ -5699,7 +5490,6 @@ pub struct FieldCondition { #[prost(message, optional, tag = "8")] pub datetime_range: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Match { #[prost(oneof = "r#match::MatchValue", tags = "1, 2, 3, 4, 5, 6, 7, 8")] @@ -5707,7 +5497,6 @@ pub struct Match { } /// Nested message and enum types in `Match`. pub mod r#match { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum MatchValue { /// Match string keyword @@ -5736,19 +5525,16 @@ pub mod r#match { ExceptKeywords(super::RepeatedStrings), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RepeatedStrings { #[prost(string, repeated, tag = "1")] pub strings: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RepeatedIntegers { #[prost(int64, repeated, tag = "1")] pub integers: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Range { #[prost(double, optional, tag = "1")] @@ -5760,7 +5546,6 @@ pub struct Range { #[prost(double, optional, tag = "4")] pub lte: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct DatetimeRange { #[prost(message, optional, tag = "1")] @@ -5772,7 +5557,6 @@ pub struct DatetimeRange { #[prost(message, optional, tag = "4")] pub lte: ::core::option::Option<::prost_types::Timestamp>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GeoBoundingBox { /// north-west corner @@ -5782,7 +5566,6 @@ pub struct GeoBoundingBox { #[prost(message, optional, tag = "2")] pub bottom_right: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GeoRadius { /// Center of the circle @@ -5792,7 +5575,6 @@ pub struct GeoRadius { #[prost(float, tag = "2")] pub radius: f32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GeoLineString { /// Ordered sequence of GeoPoints representing the line @@ -5801,7 +5583,6 @@ pub struct GeoLineString { } /// For a valid GeoPolygon, both the exterior and interior GeoLineStrings must consist of a minimum of 4 points. /// Additionally, the first and last points of each GeoLineString must be the same. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GeoPolygon { /// The exterior line bounds the surface @@ -5811,7 +5592,6 @@ pub struct GeoPolygon { #[prost(message, repeated, tag = "2")] pub interiors: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ValuesCount { #[prost(uint64, optional, tag = "1")] @@ -5823,7 +5603,6 @@ pub struct ValuesCount { #[prost(uint64, optional, tag = "4")] pub lte: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PointsSelector { #[prost(oneof = "points_selector::PointsSelectorOneOf", tags = "1, 2")] @@ -5833,7 +5612,6 @@ pub struct PointsSelector { } /// Nested message and enum types in `PointsSelector`. pub mod points_selector { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum PointsSelectorOneOf { #[prost(message, tag = "1")] @@ -5842,13 +5620,11 @@ pub mod points_selector { Filter(super::Filter), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PointsIdsList { #[prost(message, repeated, tag = "1")] pub ids: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PointStruct { #[prost(message, optional, tag = "1")] @@ -5858,7 +5634,6 @@ pub struct PointStruct { #[prost(message, optional, tag = "4")] pub vectors: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GeoPoint { #[prost(double, tag = "1")] @@ -5883,9 +5658,9 @@ impl WriteOrderingType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - WriteOrderingType::Weak => "Weak", - WriteOrderingType::Medium => "Medium", - WriteOrderingType::Strong => "Strong", + Self::Weak => "Weak", + Self::Medium => "Medium", + Self::Strong => "Strong", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -5915,9 +5690,9 @@ impl ReadConsistencyType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ReadConsistencyType::All => "All", - ReadConsistencyType::Majority => "Majority", - ReadConsistencyType::Quorum => "Quorum", + Self::All => "All", + Self::Majority => "Majority", + Self::Quorum => "Quorum", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -5949,14 +5724,14 @@ impl FieldType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - FieldType::Keyword => "FieldTypeKeyword", - FieldType::Integer => "FieldTypeInteger", - FieldType::Float => "FieldTypeFloat", - FieldType::Geo => "FieldTypeGeo", - FieldType::Text => "FieldTypeText", - FieldType::Bool => "FieldTypeBool", - FieldType::Datetime => "FieldTypeDatetime", - FieldType::Uuid => "FieldTypeUuid", + Self::Keyword => "FieldTypeKeyword", + Self::Integer => "FieldTypeInteger", + Self::Float => "FieldTypeFloat", + Self::Geo => "FieldTypeGeo", + Self::Text => "FieldTypeText", + Self::Bool => "FieldTypeBool", + Self::Datetime => "FieldTypeDatetime", + Self::Uuid => "FieldTypeUuid", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -5987,8 +5762,8 @@ impl Direction { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Direction::Asc => "Asc", - Direction::Desc => "Desc", + Self::Asc => "Asc", + Self::Desc => "Desc", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -6019,8 +5794,8 @@ impl RecommendStrategy { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - RecommendStrategy::AverageVector => "AverageVector", - RecommendStrategy::BestScore => "BestScore", + Self::AverageVector => "AverageVector", + Self::BestScore => "BestScore", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -6047,8 +5822,8 @@ impl Fusion { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Fusion::Rrf => "RRF", - Fusion::Dbsf => "DBSF", + Self::Rrf => "RRF", + Self::Dbsf => "DBSF", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -6077,7 +5852,7 @@ impl Sample { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Sample::Random => "Random", + Self::Random => "Random", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -6106,10 +5881,10 @@ impl UpdateStatus { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - UpdateStatus::UnknownUpdateStatus => "UnknownUpdateStatus", - UpdateStatus::Acknowledged => "Acknowledged", - UpdateStatus::Completed => "Completed", - UpdateStatus::ClockRejected => "ClockRejected", + Self::UnknownUpdateStatus => "UnknownUpdateStatus", + Self::Acknowledged => "Acknowledged", + Self::Completed => "Completed", + Self::ClockRejected => "ClockRejected", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -6125,7 +5900,13 @@ impl UpdateStatus { } /// Generated client implementations. pub mod points_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -6147,8 +5928,8 @@ pub mod points_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -6173,7 +5954,7 @@ pub mod points_client { >, , - >>::Error: Into + Send + Sync, + >>::Error: Into + std::marker::Send + std::marker::Sync, { PointsClient::new(InterceptedService::new(inner, interceptor)) } @@ -6221,8 +6002,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6245,8 +6025,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6266,8 +6045,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6290,8 +6068,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6317,8 +6094,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6344,8 +6120,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6368,8 +6143,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6395,8 +6169,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6422,8 +6195,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6449,8 +6221,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6476,8 +6247,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6500,8 +6270,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6524,8 +6293,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6550,8 +6318,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6574,8 +6341,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6598,8 +6364,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6622,8 +6387,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6649,8 +6413,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6690,8 +6453,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6714,8 +6476,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6738,8 +6499,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6762,8 +6522,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6785,8 +6544,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6809,8 +6567,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6833,8 +6590,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6856,8 +6612,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6880,8 +6635,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6907,8 +6661,7 @@ pub mod points_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -6925,11 +6678,17 @@ pub mod points_client { } /// Generated server implementations. pub mod points_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with PointsServer. #[async_trait] - pub trait Points: Send + Sync + 'static { + pub trait Points: std::marker::Send + std::marker::Sync + 'static { /// /// Perform insert + updates on points. If a point with a given ID already exists - it will be overwritten. async fn upsert( @@ -7180,14 +6939,14 @@ pub mod points_server { >; } #[derive(Debug)] - pub struct PointsServer { + pub struct PointsServer { inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - impl PointsServer { + impl PointsServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -7241,8 +7000,8 @@ pub mod points_server { impl tonic::codegen::Service> for PointsServer where T: Points, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -8483,23 +8242,25 @@ pub mod points_server { } _ => { Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", tonic::Code::Unimplemented as i32) - .header( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ) - .body(empty_body()) - .unwrap(), - ) + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) }) } } } } - impl Clone for PointsServer { + impl Clone for PointsServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -8511,31 +8272,28 @@ pub mod points_server { } } } - impl tonic::server::NamedService for PointsServer { - const NAME: &'static str = "qdrant.Points"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "qdrant.Points"; + impl tonic::server::NamedService for PointsServer { + const NAME: &'static str = SERVICE_NAME; } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct CreateFullSnapshotRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ListFullSnapshotsRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteFullSnapshotRequest { /// Name of the full snapshot #[prost(string, tag = "1")] pub snapshot_name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSnapshotRequest { /// Name of the collection #[prost(string, tag = "1")] pub collection_name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSnapshotsRequest { /// Name of the collection @@ -8548,7 +8306,6 @@ pub struct ListSnapshotsRequest { pattern = "owned", custom_constructor )] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSnapshotRequest { /// Name of the collection @@ -8560,7 +8317,6 @@ pub struct DeleteSnapshotRequest { #[builder(field(vis = "pub(crate)"))] pub snapshot_name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotDescription { /// Name of the snapshot @@ -8576,7 +8332,6 @@ pub struct SnapshotDescription { #[prost(string, optional, tag = "4")] pub checksum: ::core::option::Option<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSnapshotResponse { #[prost(message, optional, tag = "1")] @@ -8585,7 +8340,6 @@ pub struct CreateSnapshotResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSnapshotsResponse { #[prost(message, repeated, tag = "1")] @@ -8594,7 +8348,6 @@ pub struct ListSnapshotsResponse { #[prost(double, tag = "2")] pub time: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct DeleteSnapshotResponse { /// Time spent to process @@ -8603,7 +8356,13 @@ pub struct DeleteSnapshotResponse { } /// Generated client implementations. pub mod snapshots_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -8625,8 +8384,8 @@ pub mod snapshots_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -8651,7 +8410,7 @@ pub mod snapshots_client { >, , - >>::Error: Into + Send + Sync, + >>::Error: Into + std::marker::Send + std::marker::Sync, { SnapshotsClient::new(InterceptedService::new(inner, interceptor)) } @@ -8699,8 +8458,7 @@ pub mod snapshots_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -8723,8 +8481,7 @@ pub mod snapshots_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -8747,8 +8504,7 @@ pub mod snapshots_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -8771,8 +8527,7 @@ pub mod snapshots_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -8798,8 +8553,7 @@ pub mod snapshots_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -8824,8 +8578,7 @@ pub mod snapshots_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -8842,11 +8595,17 @@ pub mod snapshots_client { } /// Generated server implementations. pub mod snapshots_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SnapshotsServer. #[async_trait] - pub trait Snapshots: Send + Sync + 'static { + pub trait Snapshots: std::marker::Send + std::marker::Sync + 'static { /// /// Create collection snapshot async fn create( @@ -8903,14 +8662,14 @@ pub mod snapshots_server { >; } #[derive(Debug)] - pub struct SnapshotsServer { + pub struct SnapshotsServer { inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - impl SnapshotsServer { + impl SnapshotsServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -8964,8 +8723,8 @@ pub mod snapshots_server { impl tonic::codegen::Service> for SnapshotsServer where T: Snapshots, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -9250,23 +9009,25 @@ pub mod snapshots_server { } _ => { Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", tonic::Code::Unimplemented as i32) - .header( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ) - .body(empty_body()) - .unwrap(), - ) + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) }) } } } } - impl Clone for SnapshotsServer { + impl Clone for SnapshotsServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -9278,14 +9039,14 @@ pub mod snapshots_server { } } } - impl tonic::server::NamedService for SnapshotsServer { - const NAME: &'static str = "qdrant.Snapshots"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "qdrant.Snapshots"; + impl tonic::server::NamedService for SnapshotsServer { + const NAME: &'static str = SERVICE_NAME; } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct HealthCheckRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HealthCheckReply { #[prost(string, tag = "1")] @@ -9297,7 +9058,13 @@ pub struct HealthCheckReply { } /// Generated client implementations. pub mod qdrant_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -9319,8 +9086,8 @@ pub mod qdrant_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -9345,7 +9112,7 @@ pub mod qdrant_client { >, , - >>::Error: Into + Send + Sync, + >>::Error: Into + std::marker::Send + std::marker::Sync, { QdrantClient::new(InterceptedService::new(inner, interceptor)) } @@ -9391,8 +9158,7 @@ pub mod qdrant_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; @@ -9408,11 +9174,17 @@ pub mod qdrant_client { } /// Generated server implementations. pub mod qdrant_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with QdrantServer. #[async_trait] - pub trait Qdrant: Send + Sync + 'static { + pub trait Qdrant: std::marker::Send + std::marker::Sync + 'static { async fn health_check( &self, request: tonic::Request, @@ -9422,14 +9194,14 @@ pub mod qdrant_server { >; } #[derive(Debug)] - pub struct QdrantServer { + pub struct QdrantServer { inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - impl QdrantServer { + impl QdrantServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -9483,8 +9255,8 @@ pub mod qdrant_server { impl tonic::codegen::Service> for QdrantServer where T: Qdrant, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -9544,23 +9316,25 @@ pub mod qdrant_server { } _ => { Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", tonic::Code::Unimplemented as i32) - .header( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ) - .body(empty_body()) - .unwrap(), - ) + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) }) } } } } - impl Clone for QdrantServer { + impl Clone for QdrantServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -9572,8 +9346,10 @@ pub mod qdrant_server { } } } - impl tonic::server::NamedService for QdrantServer { - const NAME: &'static str = "qdrant.Qdrant"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "qdrant.Qdrant"; + impl tonic::server::NamedService for QdrantServer { + const NAME: &'static str = SERVICE_NAME; } } use crate::grpc_macros::*; From ed655e152855e6473d4fa116d75b38026bc2ea76 Mon Sep 17 00:00:00 2001 From: jojii Date: Tue, 1 Oct 2024 15:33:08 +0200 Subject: [PATCH 5/8] trigger recompiling --- tests/protos.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/protos.rs b/tests/protos.rs index b8f057d..3d94f74 100644 --- a/tests/protos.rs +++ b/tests/protos.rs @@ -1,5 +1,4 @@ use std::collections::HashSet; - use tonic_build::Builder; fn timestamp(f: impl AsRef) -> std::time::SystemTime { From 92714b7bbf3896847fd2bb77bb4036ca784560d0 Mon Sep 17 00:00:00 2001 From: jojii Date: Fri, 4 Oct 2024 11:06:55 +0200 Subject: [PATCH 6/8] add examples --- src/qdrant_client/points.rs | 66 +++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/src/qdrant_client/points.rs b/src/qdrant_client/points.rs index d3eb2f1..023f84e 100644 --- a/src/qdrant_client/points.rs +++ b/src/qdrant_client/points.rs @@ -502,6 +502,28 @@ impl Qdrant { .await } + /// Get the amount of records for each unique value of a field. + /// + /// ```no_run + ///# use qdrant_client::{Qdrant, QdrantError}; + /// use qdrant_client::qdrant::{Condition, FacetCountsBuilder, Filter}; + /// + ///# async fn facets(client: &Qdrant) + ///# -> Result<(), QdrantError> { + /// let ten_countries_with_most_points_in_europe = client + /// .facet( + /// FacetCountsBuilder::new("world_data", "country") + /// .limit(10) + /// .filter(Filter::must(vec![Condition::matches( + /// "continent", + /// "Europe".to_string(), + /// )])), + /// ) + /// .await + /// .unwrap(); + ///# Ok(()) + ///# } + /// ``` pub async fn facet(&self, request: impl Into) -> QdrantResult { let request = &request.into(); @@ -512,6 +534,28 @@ impl Qdrant { .await } + /// Get a (sparse) matrix of points with closest distance, returned as pairs. + /// + /// ```no_run + ///# use qdrant_client::{Qdrant, QdrantError}; + /// use qdrant_client::qdrant::{Condition, SearchMatrixPointsBuilder, Filter}; + /// + ///# async fn search_matrix_pairs(client: &Qdrant) + ///# -> Result<(), QdrantError> { + /// let matrix = client + /// .search_matrix_pairs( + /// SearchMatrixPointsBuilder::new("collection_name") + /// .filter(Filter::must(vec![Condition::matches( + /// "color", + /// "red".to_string(), + /// )])) + /// .sample(1000) + /// .limit(10), + /// ) + /// .await?; + ///# Ok(()) + ///# } + /// ``` pub async fn search_matrix_pairs( &self, request: impl Into, @@ -525,6 +569,28 @@ impl Qdrant { .await } + /// Get a (sparse) matrix of points with closest distance. + /// + /// ```no_run + ///# use qdrant_client::{Qdrant, QdrantError}; + /// use qdrant_client::qdrant::{Condition, SearchMatrixPointsBuilder, Filter}; + /// + ///# async fn search_matrix_offsets(client: &Qdrant) + ///# -> Result<(), QdrantError> { + /// let matrix = client + /// .search_matrix_offsets( + /// SearchMatrixPointsBuilder::new("collection_name") + /// .filter(Filter::must(vec![Condition::matches( + /// "color", + /// "red".to_string(), + /// )])) + /// .sample(1000) + /// .limit(10), + /// ) + /// .await?; + ///# Ok(()) + ///# } + /// ``` pub async fn search_matrix_offsets( &self, request: impl Into, From cd287d867100d80b089b62845b7a1afba32b38a8 Mon Sep 17 00:00:00 2001 From: jojii Date: Fri, 4 Oct 2024 11:41:54 +0200 Subject: [PATCH 7/8] add example snippets --- tests/snippet_tests/mod.rs | 3 +++ tests/snippet_tests/test_facets.rs | 25 ++++++++++++++++++ .../test_search_matrix_offsets.rs | 26 +++++++++++++++++++ .../snippet_tests/test_search_matrix_pairs.rs | 26 +++++++++++++++++++ tests/snippets/facets.rs | 15 +++++++++++ tests/snippets/search_matrix_offsets.rs | 16 ++++++++++++ tests/snippets/search_matrix_pairs.rs | 16 ++++++++++++ 7 files changed, 127 insertions(+) create mode 100644 tests/snippet_tests/test_facets.rs create mode 100644 tests/snippet_tests/test_search_matrix_offsets.rs create mode 100644 tests/snippet_tests/test_search_matrix_pairs.rs create mode 100644 tests/snippets/facets.rs create mode 100644 tests/snippets/search_matrix_offsets.rs create mode 100644 tests/snippets/search_matrix_pairs.rs diff --git a/tests/snippet_tests/mod.rs b/tests/snippet_tests/mod.rs index 1374ec6..eb8a7f7 100644 --- a/tests/snippet_tests/mod.rs +++ b/tests/snippet_tests/mod.rs @@ -17,6 +17,7 @@ mod test_delete_snapshot; mod test_delete_vectors; mod test_discover_batch_points; mod test_discover_points; +mod test_facets; mod test_get_collection; mod test_get_collection_aliases; mod test_get_collections; @@ -32,6 +33,8 @@ mod test_recommend_point_groups; mod test_recommend_points; mod test_scroll_points; mod test_search_batch_points; +mod test_search_matrix_offsets; +mod test_search_matrix_pairs; mod test_search_point_groups; mod test_search_points; mod test_set_payload; diff --git a/tests/snippet_tests/test_facets.rs b/tests/snippet_tests/test_facets.rs new file mode 100644 index 0000000..ea72f86 --- /dev/null +++ b/tests/snippet_tests/test_facets.rs @@ -0,0 +1,25 @@ + +#[tokio::test] +async fn test_facets() { + async fn facets() -> Result<(), Box> { + // WARNING: This is a generated test snippet. + // Please, modify the snippet in the `../snippets/facets.rs` file + use qdrant_client::qdrant::{Condition, FacetCountsBuilder, Filter}; + use qdrant_client::Qdrant; + + let client = Qdrant::from_url("http://localhost:6334").build()?; + + let ten_countries_with_most_poins_in_europe = client + .facet( + FacetCountsBuilder::new("world_data", "country") + .limit(10) + .filter(Filter::must(vec![Condition::matches( + "continent", + "Europe".to_string(), + )])), + ) + .await?; + Ok(()) + } + let _ = facets().await; +} diff --git a/tests/snippet_tests/test_search_matrix_offsets.rs b/tests/snippet_tests/test_search_matrix_offsets.rs new file mode 100644 index 0000000..013bf8c --- /dev/null +++ b/tests/snippet_tests/test_search_matrix_offsets.rs @@ -0,0 +1,26 @@ + +#[tokio::test] +async fn test_search_matrix_offsets() { + async fn search_matrix_offsets() -> Result<(), Box> { + // WARNING: This is a generated test snippet. + // Please, modify the snippet in the `../snippets/search_matrix_offsets.rs` file + use qdrant_client::qdrant::{Condition, SearchMatrixPointsBuilder, Filter}; + use qdrant_client::Qdrant; + + let client = Qdrant::from_url("http://localhost:6334").build()?; + + let matrix = client + .search_matrix_offsets( + SearchMatrixPointsBuilder::new("collection_name") + .filter(Filter::must(vec![Condition::matches( + "color", + "red".to_string(), + )])) + .sample(1000) + .limit(10), + ) + .await?; + Ok(()) + } + let _ = search_matrix_offsets().await; +} diff --git a/tests/snippet_tests/test_search_matrix_pairs.rs b/tests/snippet_tests/test_search_matrix_pairs.rs new file mode 100644 index 0000000..e2d0c65 --- /dev/null +++ b/tests/snippet_tests/test_search_matrix_pairs.rs @@ -0,0 +1,26 @@ + +#[tokio::test] +async fn test_search_matrix_pairs() { + async fn search_matrix_pairs() -> Result<(), Box> { + // WARNING: This is a generated test snippet. + // Please, modify the snippet in the `../snippets/search_matrix_pairs.rs` file + use qdrant_client::qdrant::{Condition, SearchMatrixPointsBuilder, Filter}; + use qdrant_client::Qdrant; + + let client = Qdrant::from_url("http://localhost:6334").build()?; + + let matrix = client + .search_matrix_pairs( + SearchMatrixPointsBuilder::new("collection_name") + .filter(Filter::must(vec![Condition::matches( + "color", + "red".to_string(), + )])) + .sample(1000) + .limit(10), + ) + .await?; + Ok(()) + } + let _ = search_matrix_pairs().await; +} diff --git a/tests/snippets/facets.rs b/tests/snippets/facets.rs new file mode 100644 index 0000000..82dd0fd --- /dev/null +++ b/tests/snippets/facets.rs @@ -0,0 +1,15 @@ +use qdrant_client::qdrant::{Condition, FacetCountsBuilder, Filter}; +use qdrant_client::Qdrant; + +let client = Qdrant::from_url("http://localhost:6334").build()?; + +let ten_countries_with_most_poins_in_europe = client + .facet( + FacetCountsBuilder::new("world_data", "country") + .limit(10) + .filter(Filter::must(vec![Condition::matches( + "continent", + "Europe".to_string(), + )])), + ) + .await?; diff --git a/tests/snippets/search_matrix_offsets.rs b/tests/snippets/search_matrix_offsets.rs new file mode 100644 index 0000000..cd1ab50 --- /dev/null +++ b/tests/snippets/search_matrix_offsets.rs @@ -0,0 +1,16 @@ +use qdrant_client::qdrant::{Condition, SearchMatrixPointsBuilder, Filter}; +use qdrant_client::Qdrant; + +let client = Qdrant::from_url("http://localhost:6334").build()?; + +let matrix = client + .search_matrix_offsets( + SearchMatrixPointsBuilder::new("collection_name") + .filter(Filter::must(vec![Condition::matches( + "color", + "red".to_string(), + )])) + .sample(1000) + .limit(10), + ) + .await?; diff --git a/tests/snippets/search_matrix_pairs.rs b/tests/snippets/search_matrix_pairs.rs new file mode 100644 index 0000000..59ba6a0 --- /dev/null +++ b/tests/snippets/search_matrix_pairs.rs @@ -0,0 +1,16 @@ +use qdrant_client::qdrant::{Condition, SearchMatrixPointsBuilder, Filter}; +use qdrant_client::Qdrant; + +let client = Qdrant::from_url("http://localhost:6334").build()?; + +let matrix = client + .search_matrix_pairs( + SearchMatrixPointsBuilder::new("collection_name") + .filter(Filter::must(vec![Condition::matches( + "color", + "red".to_string(), + )])) + .sample(1000) + .limit(10), + ) + .await?; From d0d89a5daac7fc0ffad187ed35203cbdac5a0e49 Mon Sep 17 00:00:00 2001 From: jojii Date: Mon, 7 Oct 2024 16:50:10 +0200 Subject: [PATCH 8/8] Adjust GeoIndexParams and fix warnings when compiling tests --- proto/collections.proto | 1 + src/qdrant.rs | 13 ++++++++++++- tests/protos.rs | 14 ++++++++++---- tests/snippet_tests/test_facets.rs | 2 +- tests/snippet_tests/test_search_matrix_offsets.rs | 2 +- tests/snippet_tests/test_search_matrix_pairs.rs | 2 +- tests/snippets/facets.rs | 2 +- tests/snippets/search_matrix_offsets.rs | 2 +- tests/snippets/search_matrix_pairs.rs | 2 +- 9 files changed, 29 insertions(+), 11 deletions(-) diff --git a/proto/collections.proto b/proto/collections.proto index cfc64a7..474735f 100644 --- a/proto/collections.proto +++ b/proto/collections.proto @@ -418,6 +418,7 @@ message FloatIndexParams { } message GeoIndexParams { + optional bool on_disk = 1; // If true - store index on disk. } message TextIndexParams { diff --git a/src/qdrant.rs b/src/qdrant.rs index b4f745a..e81a678 100644 --- a/src/qdrant.rs +++ b/src/qdrant.rs @@ -762,8 +762,18 @@ pub struct FloatIndexParams { #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] pub is_principal: ::core::option::Option, } +#[derive(derive_builder::Builder)] +#[builder( + build_fn(private, error = "std::convert::Infallible", name = "build_inner"), + pattern = "owned" +)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct GeoIndexParams {} +pub struct GeoIndexParams { + /// If true - store index on disk. + #[prost(bool, optional, tag = "1")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] + pub on_disk: ::core::option::Option, +} #[derive(derive_builder::Builder)] #[builder( build_fn(private, name = "build_inner"), @@ -9409,6 +9419,7 @@ builder_type_conversions!(KeywordIndexParams, KeywordIndexParamsBuilder); builder_type_conversions!(DatetimeIndexParams, DatetimeIndexParamsBuilder); builder_type_conversions!(UuidIndexParams, UuidIndexParamsBuilder); builder_type_conversions!(FloatIndexParams, FloatIndexParamsBuilder); +builder_type_conversions!(GeoIndexParams, GeoIndexParamsBuilder); builder_type_conversions!(CreateAlias, CreateAliasBuilder, true); builder_type_conversions!(RenameAlias, RenameAliasBuilder, true); builder_type_conversions!(DeleteSnapshotRequest, DeleteSnapshotRequestBuilder, true); diff --git a/tests/protos.rs b/tests/protos.rs index 3d94f74..364d56f 100644 --- a/tests/protos.rs +++ b/tests/protos.rs @@ -195,7 +195,6 @@ fn configure_builder(builder: Builder) -> Builder { ("CreateCollection.replication_factor", DEFAULT_OPTION), ("CreateCollection.write_consistency_factor", DEFAULT_OPTION), ("CreateCollection.init_from_collection", DEFAULT_OPTION_INTO), - // ("CreateCollection.quantization_config", DEFAULT_OPTION_INTO), ( ( "CreateCollection.quantization_config", builder_custom_into!(quantization_config::Quantization, self.quantization_config), @@ -206,9 +205,6 @@ fn configure_builder(builder: Builder) -> Builder { DEFAULT_OPTION_INTO, ), ("CreateCollection.strict_mode_config", DEFAULT_OPTION_INTO), - ("StrictModeConfig.search_max_hnsw_ef", DEFAULT_OPTION), - ("StrictModeConfig.search_allow_exact", DEFAULT_OPTION), - ("StrictModeConfig.search_max_oversampling", DEFAULT_OPTION), // HnswConfig ("HnswConfigDiff.m", DEFAULT_OPTION), ("HnswConfigDiff.ef_construct", DEFAULT_OPTION), @@ -729,6 +725,8 @@ fn configure_builder(builder: Builder) -> Builder { // FloatIndexParams ("FloatIndexParams.is_principal", DEFAULT_OPTION), ("FloatIndexParams.on_disk", DEFAULT_OPTION), + // GeoIndexParams + ("GeoIndexParams.on_disk", DEFAULT_OPTION), // DatetimeIndexParams ("DatetimeIndexParams.is_principal", DEFAULT_OPTION), ("DatetimeIndexParams.on_disk", DEFAULT_OPTION), @@ -779,6 +777,9 @@ fn configure_builder(builder: Builder) -> Builder { "StrictModeConfig.unindexed_filtering_update", DEFAULT_OPTION, ), + ("StrictModeConfig.search_max_hnsw_ef", DEFAULT_OPTION), + ("StrictModeConfig.search_allow_exact", DEFAULT_OPTION), + ("StrictModeConfig.search_max_oversampling", DEFAULT_OPTION), // FacetCounts ("FacetCounts.collection_name", PUBLIC_ONLY), ("FacetCounts.key", PUBLIC_ONLY), @@ -1099,6 +1100,11 @@ fn builder_derive_options() -> &'static [BuildDeriveOptions] { DEFAULT_BUILDER_DERIVE_OPTIONS, MacroConfig::DefaultImpl, ), + ( + "GeoIndexParams", + DEFAULT_BUILDER_DERIVE_OPTIONS, + MacroConfig::DefaultImpl, + ), ( "CreateAlias", NO_DEFAULT_BUILDER_DERIVE_OPTIONS, diff --git a/tests/snippet_tests/test_facets.rs b/tests/snippet_tests/test_facets.rs index ea72f86..951125f 100644 --- a/tests/snippet_tests/test_facets.rs +++ b/tests/snippet_tests/test_facets.rs @@ -9,7 +9,7 @@ async fn test_facets() { let client = Qdrant::from_url("http://localhost:6334").build()?; - let ten_countries_with_most_poins_in_europe = client + client .facet( FacetCountsBuilder::new("world_data", "country") .limit(10) diff --git a/tests/snippet_tests/test_search_matrix_offsets.rs b/tests/snippet_tests/test_search_matrix_offsets.rs index 013bf8c..276c87c 100644 --- a/tests/snippet_tests/test_search_matrix_offsets.rs +++ b/tests/snippet_tests/test_search_matrix_offsets.rs @@ -9,7 +9,7 @@ async fn test_search_matrix_offsets() { let client = Qdrant::from_url("http://localhost:6334").build()?; - let matrix = client + client .search_matrix_offsets( SearchMatrixPointsBuilder::new("collection_name") .filter(Filter::must(vec![Condition::matches( diff --git a/tests/snippet_tests/test_search_matrix_pairs.rs b/tests/snippet_tests/test_search_matrix_pairs.rs index e2d0c65..bc4b198 100644 --- a/tests/snippet_tests/test_search_matrix_pairs.rs +++ b/tests/snippet_tests/test_search_matrix_pairs.rs @@ -9,7 +9,7 @@ async fn test_search_matrix_pairs() { let client = Qdrant::from_url("http://localhost:6334").build()?; - let matrix = client + client .search_matrix_pairs( SearchMatrixPointsBuilder::new("collection_name") .filter(Filter::must(vec![Condition::matches( diff --git a/tests/snippets/facets.rs b/tests/snippets/facets.rs index 82dd0fd..aea1be7 100644 --- a/tests/snippets/facets.rs +++ b/tests/snippets/facets.rs @@ -3,7 +3,7 @@ use qdrant_client::Qdrant; let client = Qdrant::from_url("http://localhost:6334").build()?; -let ten_countries_with_most_poins_in_europe = client +client .facet( FacetCountsBuilder::new("world_data", "country") .limit(10) diff --git a/tests/snippets/search_matrix_offsets.rs b/tests/snippets/search_matrix_offsets.rs index cd1ab50..1e9980f 100644 --- a/tests/snippets/search_matrix_offsets.rs +++ b/tests/snippets/search_matrix_offsets.rs @@ -3,7 +3,7 @@ use qdrant_client::Qdrant; let client = Qdrant::from_url("http://localhost:6334").build()?; -let matrix = client +client .search_matrix_offsets( SearchMatrixPointsBuilder::new("collection_name") .filter(Filter::must(vec![Condition::matches( diff --git a/tests/snippets/search_matrix_pairs.rs b/tests/snippets/search_matrix_pairs.rs index 59ba6a0..a72dc48 100644 --- a/tests/snippets/search_matrix_pairs.rs +++ b/tests/snippets/search_matrix_pairs.rs @@ -3,7 +3,7 @@ use qdrant_client::Qdrant; let client = Qdrant::from_url("http://localhost:6334").build()?; -let matrix = client +client .search_matrix_pairs( SearchMatrixPointsBuilder::new("collection_name") .filter(Filter::must(vec![Condition::matches(