diff --git a/proto/collections.proto b/proto/collections.proto index 3b7774d..d545b45 100644 --- a/proto/collections.proto +++ b/proto/collections.proto @@ -3,6 +3,8 @@ package qdrant; option csharp_namespace = "Qdrant.Client.Grpc"; +import "json_with_int.proto"; + enum Datatype { Default = 0; Float32 = 1; @@ -170,10 +172,12 @@ message HnswConfigDiff { */ optional uint64 ef_construct = 2; /* - Minimal size (in KiloBytes) of vectors for additional payload-based indexing. - If the payload chunk is smaller than `full_scan_threshold` additional indexing won't be used - - in this case full-scan search should be preferred by query planner and additional indexing is not required. - Note: 1 Kb = 1 vector of size 256 + Minimal size threshold (in KiloBytes) below which full-scan is preferred over HNSW search. + This measures the total size of vectors being queried against. + When the maximum estimated amount of points that a condition satisfies is smaller than + `full_scan_threshold`, the query planner will use full-scan search instead of HNSW index + traversal for better performance. + Note: 1Kb = 1 vector of size 256 */ optional uint64 full_scan_threshold = 3; /* @@ -212,6 +216,7 @@ message SparseIndexConfig { message WalConfigDiff { optional uint64 wal_capacity_mb = 1; // Size of a single WAL block file optional uint64 wal_segments_ahead = 2; // Number of segments to create in advance + optional uint64 wal_retain_closed = 3; // Number of closed segments to retain } message OptimizersConfigDiff { @@ -405,6 +410,7 @@ message CreateCollection { 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 + map metadata = 18; // Arbitrary JSON metadata for the collection } message UpdateCollection { @@ -417,6 +423,7 @@ message UpdateCollection { optional QuantizationConfigDiff quantization_config = 7; // Quantization configuration of vector optional SparseVectorConfig sparse_vectors_config = 8; // New sparse vector parameters optional StrictModeConfig strict_mode_config = 9; // New strict mode configuration + map metadata = 10; // Arbitrary JSON-like metadata for the collection, will be merged with already stored metadata } message DeleteCollection { @@ -456,6 +463,7 @@ message CollectionConfig { 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. + map metadata = 7; // Arbitrary JSON metadata for the collection } enum TokenizerType { diff --git a/proto/points.proto b/proto/points.proto index 921e85a..de126d4 100644 --- a/proto/points.proto +++ b/proto/points.proto @@ -135,6 +135,7 @@ message UpsertPoints { repeated PointStruct points = 3; optional WriteOrdering ordering = 4; // Write ordering guarantees optional ShardKeySelector shard_key_selector = 5; // Option for custom sharding to specify used shard keys + optional Filter update_filter = 6; // If specified, only points that match this filter will be updated, others will be inserted } message DeletePoints { @@ -162,6 +163,7 @@ message UpdatePointVectors { repeated PointVectors points = 3; // List of points and vectors to update optional WriteOrdering ordering = 4; // Write ordering guarantees optional ShardKeySelector shard_key_selector = 5; // Option for custom sharding to specify used shard keys + optional Filter update_filter = 6; // If specified, only points that match this filter will be updated } message PointVectors { @@ -563,7 +565,7 @@ message ContextInput { } enum Fusion { - RRF = 0; // Reciprocal Rank Fusion + RRF = 0; // Reciprocal Rank Fusion (with default parameters) DBSF = 1; // Distribution-Based Score Fusion } @@ -636,7 +638,7 @@ message DecayParamsExpression { optional Expression target = 2; // The scale factor of the decay, in terms of `x`. Defaults to 1.0. Must be a non-zero positive number. optional float scale = 3; - // The midpoint of the decay. Defaults to 0.5. Output will be this value when `|x - target| == scale`. + // The midpoint of the decay. Should be between 0 and 1. Defaults to 0.5. Output will be this value when `|x - target| == scale`. optional float midpoint = 4; } @@ -667,6 +669,11 @@ message Mmr { optional uint32 candidates_limit = 3; } +// Parameterized reciprocal rank fusion +message Rrf { + optional uint32 k = 1; // K parameter for reciprocal rank fusion +} + message Query { oneof variant { VectorInput nearest = 1; // Find the nearest neighbors to this vector. @@ -678,6 +685,7 @@ message Query { Sample sample = 7; // Sample points from the collection. Formula formula = 8; // Score boosting via an arbitrary formula NearestInputWithMmr nearest_with_mmr = 9; // Search nearest neighbors, but re-rank based on the Maximal Marginal Relevance algorithm. + Rrf rrf = 10; // Parameterized reciprocal rank fusion } } @@ -794,6 +802,7 @@ message PointsUpdateOperation { message PointStructList { repeated PointStruct points = 1; optional ShardKeySelector shard_key_selector = 2; // Option for custom sharding to specify used shard keys + optional Filter update_filter = 3; // If specified, only points that match this filter will be updated, others will be inserted } message SetPayload { map payload = 1; @@ -815,6 +824,7 @@ message PointsUpdateOperation { message UpdateVectors { repeated PointVectors points = 1; // List of points and vectors to update optional ShardKeySelector shard_key_selector = 2; // Option for custom sharding to specify used shard keys + optional Filter update_filter = 3; // If specified, only points that match this filter will be updated } message DeleteVectors { PointsSelector points_selector = 1; // Affected points @@ -1023,6 +1033,7 @@ message UpdateBatchResponse { message FacetResponse { repeated FacetHit hits = 1; double time = 2; // Time spent to process + optional Usage usage = 3; } message SearchMatrixPairsResponse { @@ -1110,6 +1121,7 @@ message Match { RepeatedIntegers except_integers = 7; // Match any other value except those integers RepeatedStrings except_keywords = 8; // Match any other value except those keywords string phrase = 9; // Match phrase text + string text_any = 10; // Match any word in the text } } diff --git a/src/builders/create_collection_builder.rs b/src/builders/create_collection_builder.rs index edba1a4..9aa361d 100644 --- a/src/builders/create_collection_builder.rs +++ b/src/builders/create_collection_builder.rs @@ -214,6 +214,7 @@ impl CreateCollectionBuilder { Some(value) => value, None => core::default::Default::default(), }, + metadata: Default::default(), }) } /// Create an empty builder, with all fields set to `None` or `PhantomData`. diff --git a/src/builders/update_collection_builder.rs b/src/builders/update_collection_builder.rs index 227f72a..ca11591 100644 --- a/src/builders/update_collection_builder.rs +++ b/src/builders/update_collection_builder.rs @@ -123,6 +123,7 @@ impl UpdateCollectionBuilder { quantization_config: { convert_option(&self.quantization_config) }, sparse_vectors_config: self.sparse_vectors_config.unwrap_or_default(), strict_mode_config: self.strict_mode_config.unwrap_or_default(), + metadata: Default::default(), }) } /// Create an empty builder, with all fields set to `None` or `PhantomData`. diff --git a/src/builders/update_point_vectors_builder.rs b/src/builders/update_point_vectors_builder.rs index 6a0c5a7..fd110fe 100644 --- a/src/builders/update_point_vectors_builder.rs +++ b/src/builders/update_point_vectors_builder.rs @@ -75,6 +75,7 @@ impl UpdatePointVectorsBuilder { }, ordering: self.ordering.unwrap_or_default(), shard_key_selector: self.shard_key_selector.unwrap_or_default(), + update_filter: None, }) } /// Create an empty builder, with all fields set to `None` or `PhantomData`. diff --git a/src/builders/upsert_points_builder.rs b/src/builders/upsert_points_builder.rs index a0d44ab..458fb29 100644 --- a/src/builders/upsert_points_builder.rs +++ b/src/builders/upsert_points_builder.rs @@ -73,6 +73,7 @@ impl UpsertPointsBuilder { }, ordering: self.ordering.unwrap_or_default(), shard_key_selector: self.shard_key_selector.unwrap_or_default(), + update_filter: None, }) } /// Create an empty builder, with all fields set to `None` or `PhantomData`. diff --git a/src/builders/wal_config_diff_builder.rs b/src/builders/wal_config_diff_builder.rs index b42f88e..c3873a2 100644 --- a/src/builders/wal_config_diff_builder.rs +++ b/src/builders/wal_config_diff_builder.rs @@ -28,6 +28,7 @@ impl WalConfigDiffBuilder { Ok(WalConfigDiff { wal_capacity_mb: self.wal_capacity_mb.unwrap_or_default(), wal_segments_ahead: self.wal_segments_ahead.unwrap_or_default(), + wal_retain_closed: None, }) } /// Create an empty builder, with all fields set to `None` or `PhantomData`. diff --git a/src/client/collection.rs b/src/client/collection.rs index 8dd033a..23b7217 100644 --- a/src/client/collection.rs +++ b/src/client/collection.rs @@ -141,6 +141,7 @@ impl QdrantClient { vectors_config: vectors_config.cloned(), quantization_config: quantization_config.cloned(), strict_mode_config: None, + metadata: Default::default(), }) .await?; diff --git a/src/client/points.rs b/src/client/points.rs index 24d269a..d517bba 100644 --- a/src/client/points.rs +++ b/src/client/points.rs @@ -175,6 +175,7 @@ impl QdrantClient { points: points.to_vec(), ordering: ordering_ref.cloned(), shard_key_selector: shard_keys_ref.clone(), + update_filter: None, }) .await? .into_inner()) @@ -278,6 +279,7 @@ impl QdrantClient { points: chunk.to_vec(), ordering: ordering_ref.cloned(), shard_key_selector: shard_keys_ref.clone(), + update_filter: None, }) .await? .into_inner(); @@ -925,6 +927,7 @@ impl QdrantClient { points: points.to_owned(), ordering: ordering_ref.cloned(), shard_key_selector: shard_keys_ref.clone(), + update_filter: None, }) .await?; Ok(result.into_inner()) diff --git a/src/filters.rs b/src/filters.rs index 665e3d5..448b85e 100644 --- a/src/filters.rs +++ b/src/filters.rs @@ -469,6 +469,9 @@ impl std::ops::Not for MatchValue { Self::Phrase(_) => { panic!("cannot negate a MatchValue::Phrase, use within must_not clause instead") } + Self::TextAny(_) => { + panic!("cannot negate a MatchValue::TextAny, use within must_not clause instead") + } } } } diff --git a/src/manual_builder.rs b/src/manual_builder.rs index dbd9b62..9fe1d3d 100644 --- a/src/manual_builder.rs +++ b/src/manual_builder.rs @@ -52,6 +52,7 @@ pub mod points_update_operation { Ok(PointStructList { points: builder.points, shard_key_selector: builder.shard_key_selector, + update_filter: None, }) } } @@ -248,6 +249,7 @@ pub mod points_update_operation { Ok(UpdateVectors { points: builder.points, shard_key_selector: builder.shard_key_selector, + update_filter: None, }) } } diff --git a/src/qdrant.rs b/src/qdrant.rs index 52148d4..162452e 100644 --- a/src/qdrant.rs +++ b/src/qdrant.rs @@ -1,4 +1,95 @@ // This file is @generated by prost-build. +/// `Struct` represents a structured data value, consisting of fields +/// which map to dynamically typed values. In some languages, `Struct` +/// might be supported by a native representation. For example, in +/// scripting languages like JS a struct is represented as an +/// object. The details of that representation are described together +/// with the proto support for the language. +/// +/// The JSON representation for `Struct` is a JSON object. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Struct { + /// Unordered map of dynamically typed values. + #[prost(map = "string, message", tag = "1")] + pub fields: ::std::collections::HashMap<::prost::alloc::string::String, Value>, +} +/// `Value` represents a dynamically typed value which can be either +/// null, a number, a string, a boolean, a recursive struct value, or a +/// list of values. A producer of value is expected to set one of those +/// variants, absence of any variant indicates an error. +/// +/// The JSON representation for `Value` is a JSON value. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Value { + /// The kind of value. + #[prost(oneof = "value::Kind", tags = "1, 2, 3, 4, 5, 6, 7")] + pub kind: ::core::option::Option, +} +/// Nested message and enum types in `Value`. +pub mod value { + /// The kind of value. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Kind { + /// Represents a null value. + #[prost(enumeration = "super::NullValue", tag = "1")] + NullValue(i32), + /// Represents a double value. + #[prost(double, tag = "2")] + DoubleValue(f64), + /// Represents an integer value + #[prost(int64, tag = "3")] + IntegerValue(i64), + /// Represents a string value. + #[prost(string, tag = "4")] + StringValue(::prost::alloc::string::String), + /// Represents a boolean value. + #[prost(bool, tag = "5")] + BoolValue(bool), + /// Represents a structured value. + #[prost(message, tag = "6")] + StructValue(super::Struct), + /// Represents a repeated `Value`. + #[prost(message, tag = "7")] + ListValue(super::ListValue), + } +} +/// `ListValue` is a wrapper around a repeated field of values. +/// +/// The JSON representation for `ListValue` is a JSON array. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListValue { + /// Repeated field of dynamically typed values. + #[prost(message, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec, +} +/// `NullValue` is a singleton enumeration to represent the null value for the +/// `Value` type union. +/// +/// The JSON representation for `NullValue` is JSON `null`. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum NullValue { + /// Null value. + NullValue = 0, +} +impl NullValue { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::NullValue => "NULL_VALUE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "NULL_VALUE" => Some(Self::NullValue), + _ => None, + } + } +} #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct VectorParams { /// Size of the vectors @@ -215,10 +306,12 @@ pub struct HnswConfigDiff { #[prost(uint64, optional, tag = "2")] pub ef_construct: ::core::option::Option, /// - /// Minimal size (in KiloBytes) of vectors for additional payload-based indexing. - /// If the payload chunk is smaller than `full_scan_threshold` additional indexing won't be used - - /// in this case full-scan search should be preferred by query planner and additional indexing is not required. - /// Note: 1 Kb = 1 vector of size 256 + /// Minimal size threshold (in KiloBytes) below which full-scan is preferred over HNSW search. + /// This measures the total size of vectors being queried against. + /// When the maximum estimated amount of points that a condition satisfies is smaller than + /// `full_scan_threshold`, the query planner will use full-scan search instead of HNSW index + /// traversal for better performance. + /// Note: 1Kb = 1 vector of size 256 #[prost(uint64, optional, tag = "3")] pub full_scan_threshold: ::core::option::Option, /// @@ -261,6 +354,9 @@ pub struct WalConfigDiff { /// Number of segments to create in advance #[prost(uint64, optional, tag = "2")] pub wal_segments_ahead: ::core::option::Option, + /// Number of closed segments to retain + #[prost(uint64, optional, tag = "3")] + pub wal_retain_closed: ::core::option::Option, } #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct OptimizersConfigDiff { @@ -284,6 +380,8 @@ pub struct OptimizersConfigDiff { #[prost(uint64, optional, tag = "3")] pub default_segment_number: ::core::option::Option, /// + /// Deprecated: + /// /// Do not create segments larger this size (in kilobytes). /// Large segments might require disproportionately long indexation times, /// therefore it makes sense to limit the size of segments. @@ -557,7 +655,7 @@ pub struct CreateCollection { /// How many replicas should apply the operation for us to consider it successful, default = 1 #[prost(uint32, optional, tag = "12")] pub write_consistency_factor: ::core::option::Option, - /// Specify name of the other collection to copy data from + /// Deprecated: specify name of the other collection to copy data from #[prost(string, optional, tag = "13")] pub init_from_collection: ::core::option::Option<::prost::alloc::string::String>, /// Quantization configuration of vector @@ -572,6 +670,9 @@ pub struct CreateCollection { /// Configuration for strict mode #[prost(message, optional, tag = "17")] pub strict_mode_config: ::core::option::Option, + /// Arbitrary JSON metadata for the collection + #[prost(map = "string, message", tag = "18")] + pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateCollection { @@ -602,6 +703,9 @@ pub struct UpdateCollection { /// New strict mode configuration #[prost(message, optional, tag = "9")] pub strict_mode_config: ::core::option::Option, + /// Arbitrary JSON-like metadata for the collection, will be merged with already stored metadata + #[prost(map = "string, message", tag = "10")] + pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteCollection { @@ -683,6 +787,9 @@ pub struct CollectionConfig { /// Configuration of strict mode. #[prost(message, optional, tag = "6")] pub strict_mode_config: ::core::option::Option, + /// Arbitrary JSON metadata for the collection + #[prost(map = "string, message", tag = "7")] + pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>, } #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct KeywordIndexParams { @@ -2956,97 +3063,6 @@ pub mod collections_server { const NAME: &'static str = SERVICE_NAME; } } -/// `Struct` represents a structured data value, consisting of fields -/// which map to dynamically typed values. In some languages, `Struct` -/// might be supported by a native representation. For example, in -/// scripting languages like JS a struct is represented as an -/// object. The details of that representation are described together -/// with the proto support for the language. -/// -/// The JSON representation for `Struct` is a JSON object. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Struct { - /// Unordered map of dynamically typed values. - #[prost(map = "string, message", tag = "1")] - pub fields: ::std::collections::HashMap<::prost::alloc::string::String, Value>, -} -/// `Value` represents a dynamically typed value which can be either -/// null, a number, a string, a boolean, a recursive struct value, or a -/// list of values. A producer of value is expected to set one of those -/// variants, absence of any variant indicates an error. -/// -/// The JSON representation for `Value` is a JSON value. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Value { - /// The kind of value. - #[prost(oneof = "value::Kind", tags = "1, 2, 3, 4, 5, 6, 7")] - pub kind: ::core::option::Option, -} -/// Nested message and enum types in `Value`. -pub mod value { - /// The kind of value. - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Kind { - /// Represents a null value. - #[prost(enumeration = "super::NullValue", tag = "1")] - NullValue(i32), - /// Represents a double value. - #[prost(double, tag = "2")] - DoubleValue(f64), - /// Represents an integer value - #[prost(int64, tag = "3")] - IntegerValue(i64), - /// Represents a string value. - #[prost(string, tag = "4")] - StringValue(::prost::alloc::string::String), - /// Represents a boolean value. - #[prost(bool, tag = "5")] - BoolValue(bool), - /// Represents a structured value. - #[prost(message, tag = "6")] - StructValue(super::Struct), - /// Represents a repeated `Value`. - #[prost(message, tag = "7")] - ListValue(super::ListValue), - } -} -/// `ListValue` is a wrapper around a repeated field of values. -/// -/// The JSON representation for `ListValue` is a JSON array. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListValue { - /// Repeated field of dynamically typed values. - #[prost(message, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec, -} -/// `NullValue` is a singleton enumeration to represent the null value for the -/// `Value` type union. -/// -/// The JSON representation for `NullValue` is JSON `null`. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum NullValue { - /// Null value. - NullValue = 0, -} -impl NullValue { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Self::NullValue => "NULL_VALUE", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "NULL_VALUE" => Some(Self::NullValue), - _ => None, - } - } -} #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct WriteOrdering { /// Write ordering guarantees @@ -3258,6 +3274,9 @@ pub struct UpsertPoints { /// Option for custom sharding to specify used shard keys #[prost(message, optional, tag = "5")] pub shard_key_selector: ::core::option::Option, + /// If specified, only points that match this filter will be updated, others will be inserted + #[prost(message, optional, tag = "6")] + pub update_filter: ::core::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeletePoints { @@ -3318,6 +3337,9 @@ pub struct UpdatePointVectors { /// Option for custom sharding to specify used shard keys #[prost(message, optional, tag = "5")] pub shard_key_selector: ::core::option::Option, + /// If specified, only points that match this filter will be updated + #[prost(message, optional, tag = "6")] + pub update_filter: ::core::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct PointVectors { @@ -4187,7 +4209,7 @@ pub struct DecayParamsExpression { /// The scale factor of the decay, in terms of `x`. Defaults to 1.0. Must be a non-zero positive number. #[prost(float, optional, tag = "3")] pub scale: ::core::option::Option, - /// The midpoint of the decay. Defaults to 0.5. Output will be this value when `|x - target| == scale`. + /// The midpoint of the decay. Should be between 0 and 1. Defaults to 0.5. Output will be this value when `|x - target| == scale`. #[prost(float, optional, tag = "4")] pub midpoint: ::core::option::Option, } @@ -4220,9 +4242,16 @@ pub struct Mmr { #[prost(uint32, optional, tag = "3")] pub candidates_limit: ::core::option::Option, } +/// Parameterized reciprocal rank fusion +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct Rrf { + /// K parameter for reciprocal rank fusion + #[prost(uint32, optional, tag = "1")] + pub k: ::core::option::Option, +} #[derive(Clone, PartialEq, ::prost::Message)] pub struct Query { - #[prost(oneof = "query::Variant", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9")] + #[prost(oneof = "query::Variant", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")] pub variant: ::core::option::Option, } /// Nested message and enum types in `Query`. @@ -4256,6 +4285,9 @@ pub mod query { /// Search nearest neighbors, but re-rank based on the Maximal Marginal Relevance algorithm. #[prost(message, tag = "9")] NearestWithMmr(super::NearestInputWithMmr), + /// Parameterized reciprocal rank fusion + #[prost(message, tag = "10")] + Rrf(super::Rrf), } } #[derive(Clone, PartialEq, ::prost::Message)] @@ -4533,6 +4565,9 @@ pub mod points_update_operation { /// Option for custom sharding to specify used shard keys #[prost(message, optional, tag = "2")] pub shard_key_selector: ::core::option::Option, + /// If specified, only points that match this filter will be updated, others will be inserted + #[prost(message, optional, tag = "3")] + pub update_filter: ::core::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetPayload { @@ -4587,6 +4622,9 @@ pub mod points_update_operation { /// Option for custom sharding to specify used shard keys #[prost(message, optional, tag = "2")] pub shard_key_selector: ::core::option::Option, + /// If specified, only points that match this filter will be updated + #[prost(message, optional, tag = "3")] + pub update_filter: ::core::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteVectors { @@ -4939,6 +4977,8 @@ pub struct FacetResponse { /// Time spent to process #[prost(double, tag = "2")] pub time: f64, + #[prost(message, optional, tag = "3")] + pub usage: ::core::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchMatrixPairsResponse { @@ -5070,7 +5110,7 @@ pub struct FieldCondition { } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Match { - #[prost(oneof = "r#match::MatchValue", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9")] + #[prost(oneof = "r#match::MatchValue", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")] pub match_value: ::core::option::Option, } /// Nested message and enum types in `Match`. @@ -5104,6 +5144,9 @@ pub mod r#match { /// Match phrase text #[prost(string, tag = "9")] Phrase(::prost::alloc::string::String), + /// Match any word in the text + #[prost(string, tag = "10")] + TextAny(::prost::alloc::string::String), } } #[derive(Clone, PartialEq, ::prost::Message)] @@ -5433,7 +5476,7 @@ impl RecommendStrategy { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum Fusion { - /// Reciprocal Rank Fusion + /// Reciprocal Rank Fusion (with default parameters) Rrf = 0, /// Distribution-Based Score Fusion Dbsf = 1, diff --git a/src/serde_deser.rs b/src/serde_deser.rs index 15dec48..a0b6450 100644 --- a/src/serde_deser.rs +++ b/src/serde_deser.rs @@ -475,7 +475,8 @@ mod test { use serde::{Deserialize, Serialize}; use serde_json::json; - use crate::{serde_deser::DeserPayloadError, Payload}; + use crate::serde_deser::DeserPayloadError; + use crate::Payload; #[test] fn test_json_deser() { diff --git a/tests/snippet_tests/test_create_text_index.rs b/tests/snippet_tests/test_create_text_index.rs index 433647e..9f22f52 100644 --- a/tests/snippet_tests/test_create_text_index.rs +++ b/tests/snippet_tests/test_create_text_index.rs @@ -15,7 +15,8 @@ async fn test_create_text_index() { let client = Qdrant::from_url("http://localhost:6334").build()?; let text_index_params = TextIndexParamsBuilder::new(TokenizerType::Word) - .phrase_matching(true) + .min_token_len(2) + .max_token_len(10) .lowercase(true); client