Skip to content

Commit

Permalink
Merge pull request #57 from qdrant/update-v1.3.0
Browse files Browse the repository at this point in the history
Update v1.3.0
  • Loading branch information
generall committed Jun 23, 2023
2 parents d6a89c1 + 19a78bb commit cd7ee0f
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "qdrant-client"
version = "1.2.1"
version = "1.3.0"
edition = "2021"
authors = ["Qdrant Team <team@qdrant.com>"]
description = "Rust client for Qdrant Vector Search Engine"
Expand Down
2 changes: 1 addition & 1 deletion proto/collections.proto
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ message CreateCollection {
optional HnswConfigDiff hnsw_config = 4; // Configuration of vector index
optional WalConfigDiff wal_config = 5; // Configuration of the Write-Ahead-Log
optional OptimizersConfigDiff optimizers_config = 6; // Configuration of the optimizers
optional uint32 shard_number = 7; // Number of shards in the collection, default = 1
optional uint32 shard_number = 7; // Number of shards in the collection, default is 1 for standalone, otherwise equal to the number of nodes. Minimum is 1
optional bool on_disk_payload = 8; // If true - point's payload will not be stored in memory
optional uint64 timeout = 9; // Wait timeout for operation commit in seconds, if not specified - default value will be supplied
optional VectorsConfig vectors_config = 10; // Configuration for vectors
Expand Down
35 changes: 22 additions & 13 deletions proto/points.proto
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,17 @@ message QuantizationSearchParams {
If true, use original vectors to re-score top-k results. Default is true.
*/
optional bool rescore = 2;

/*
Oversampling factor for quantization.
Defines how many extra vectors should be pre-selected using quantized index,
and then re-scored using original vectors.
For example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index,
and then top-100 will be returned after re-scoring.
*/
optional double oversampling = 3;
}

message SearchParams {
Expand Down Expand Up @@ -229,6 +240,13 @@ message SearchBatchPoints {
optional ReadConsistency read_consistency = 3; // Options for specifying read consistency guarantees
}

message WithLookup {
string collection = 1; // Name of the collection to use for points lookup
optional WithPayloadSelector with_payload = 2; // Options for specifying which payload to include (or not)
optional WithVectorsSelector with_vectors = 3; // Options for specifying which vectors to include (or not)
}


message SearchPointGroups {
string collection_name = 1; // Name of the collection
repeated float vector = 2; // Vector to compare against
Expand All @@ -242,6 +260,7 @@ message SearchPointGroups {
string group_by = 10; // Payload field to group by, must be a string or number field. If there are multiple values for the field, all of them will be used. One point can be in multiple groups.
uint32 group_size = 11; // Maximum amount of points to return per group
optional ReadConsistency read_consistency = 12; // Options for specifying read consistency guarantees
optional WithLookup with_lookup = 13; // Options for specifying how to use the group id to lookup points in another collection
}

message ScrollPoints {
Expand Down Expand Up @@ -298,6 +317,7 @@ message RecommendPointGroups {
string group_by = 12; // Payload field to group by, must be a string or number field. If there are multiple values for the field, all of them will be used. One point can be in multiple groups.
uint32 group_size = 13; // Maximum amount of points to return per group
optional ReadConsistency read_consistency = 14; // Options for specifying read consistency guarantees
optional WithLookup with_lookup = 15; // Options for specifying how to use the group id to lookup points in another collection
}

message CountPoints {
Expand Down Expand Up @@ -348,7 +368,8 @@ message GroupId {

message PointGroup {
GroupId id = 1; // Group id
repeated ScoredPoint hits = 2; // Points in the group
repeated ScoredPoint hits = 2; // Points in the group
RetrievedPoint lookup = 3; // Point(s) from the lookup collection that matches the group id
}

message GroupsResult {
Expand Down Expand Up @@ -420,18 +441,6 @@ message RecommendGroupsResponse {
// ------------- Filter Conditions -------------
// ---------------------------------------------

// Filters come in three variants:
//
// * `should`: will match if any of the conditions do
// * `must`: will match if all of the conditions do
// * `must_not`: will match if *none* of the conditions do
//
// # Examples
// ```
// use qdrant_client::qdrant::{Condition, Filter};
//
// Filter::all(Some(Condition::is_empty("remarks")));
// ```
message Filter {
repeated Condition should = 1; // At least one of those conditions should match
repeated Condition must = 2; // All conditions must match
Expand Down
34 changes: 33 additions & 1 deletion src/qdrant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ pub struct CreateCollection {
/// Configuration of the optimizers
#[prost(message, optional, tag = "6")]
pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
/// Number of shards in the collection, default = 1
/// Number of shards in the collection, default is 1 for standalone, otherwise equal to the number of nodes. Minimum is 1
#[prost(uint32, optional, tag = "7")]
pub shard_number: ::core::option::Option<u32>,
/// If true - point's payload will not be stored in memory
Expand Down Expand Up @@ -2321,6 +2321,16 @@ pub struct QuantizationSearchParams {
/// If true, use original vectors to re-score top-k results. Default is true.
#[prost(bool, optional, tag = "2")]
pub rescore: ::core::option::Option<bool>,
///
/// Oversampling factor for quantization.
///
/// Defines how many extra vectors should be pre-selected using quantized index,
/// and then re-scored using original vectors.
///
/// For example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index,
/// and then top-100 will be returned after re-scoring.
#[prost(double, optional, tag = "3")]
pub oversampling: ::core::option::Option<f64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down Expand Up @@ -2390,6 +2400,19 @@ pub struct SearchBatchPoints {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WithLookup {
/// Name of the collection to use for points lookup
#[prost(string, tag = "1")]
pub collection: ::prost::alloc::string::String,
/// Options for specifying which payload to include (or not)
#[prost(message, optional, tag = "2")]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
/// Options for specifying which vectors to include (or not)
#[prost(message, optional, tag = "3")]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchPointGroups {
/// Name of the collection
#[prost(string, tag = "1")]
Expand Down Expand Up @@ -2427,6 +2450,9 @@ pub struct SearchPointGroups {
/// Options for specifying read consistency guarantees
#[prost(message, optional, tag = "12")]
pub read_consistency: ::core::option::Option<ReadConsistency>,
/// Options for specifying how to use the group id to lookup points in another collection
#[prost(message, optional, tag = "13")]
pub with_lookup: ::core::option::Option<WithLookup>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down Expand Up @@ -2561,6 +2587,9 @@ pub struct RecommendPointGroups {
/// Options for specifying read consistency guarantees
#[prost(message, optional, tag = "14")]
pub read_consistency: ::core::option::Option<ReadConsistency>,
/// Options for specifying how to use the group id to lookup points in another collection
#[prost(message, optional, tag = "15")]
pub with_lookup: ::core::option::Option<WithLookup>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down Expand Up @@ -2644,6 +2673,9 @@ pub struct PointGroup {
/// Points in the group
#[prost(message, repeated, tag = "2")]
pub hits: ::prost::alloc::vec::Vec<ScoredPoint>,
/// Point(s) from the lookup collection that matches the group id
#[prost(message, optional, tag = "3")]
pub lookup: ::core::option::Option<RetrievedPoint>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down
2 changes: 1 addition & 1 deletion tests/integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function stop_docker()
# Ensure current path is project root
cd "$(dirname "$0")/../"

QDRANT_VERSION='v1.2.0'
QDRANT_VERSION='v1.3.0'

QDRANT_HOST='localhost:6333'

Expand Down

0 comments on commit cd7ee0f

Please sign in to comment.