Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/node-js-basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"author": "Qdrant Team",
"license": "Apache-2.0",
"dependencies": {
"@qdrant/qdrant-js": "^1.15.1"
"@qdrant/qdrant-js": "^1.16.0"
}
}
11 changes: 11 additions & 0 deletions packages/js-client-grpc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @qdrant/js-client-grpc

## 1.16.0

### Minor Changes

- Qdrant v1.16.0 API
- Breaking: removed `/locks` API
- Breaking: removed `init_from` parameter from collection creation
- Breaking: removed `vectors_count` from collection info
- Breaking: Updated `@connectrpc/connect` dependency to v2
- Added option to disable gRPC channel compression

## 1.15.1

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/js-client-grpc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@qdrant/js-client-grpc",
"version": "1.15.1",
"version": "1.16.0",
"engines": {
"node": ">=18.0.0",
"pnpm": ">=8"
Expand Down
12 changes: 12 additions & 0 deletions packages/js-client-grpc/proto/collections.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package qdrant;
option csharp_namespace = "Qdrant.Client.Grpc";

import "json_with_int.proto";
import "common.proto";

enum Datatype {
Default = 0;
Expand All @@ -12,6 +13,10 @@ enum Datatype {
Float16 = 3;
}

// ---------------------------------------------
// ------------- Collection Config -------------
// ---------------------------------------------

message VectorParams {
uint64 size = 1; // Size of the vectors
Distance distance = 2; // Distance function used for comparing vectors
Expand Down Expand Up @@ -724,6 +729,12 @@ message RestartTransfer {
ShardTransferMethod method = 4;
}

message ReplicatePoints {
ShardKey from_shard_key = 1; // Source shard key
ShardKey to_shard_key = 2; // Target shard key
optional Filter filter = 3; // If set - only points matching the filter will be replicated
}

enum ShardTransferMethod {
StreamRecords = 0; // Stream shard records in batches
Snapshot = 1; // Snapshot the shard and recover it on the target peer
Expand Down Expand Up @@ -758,6 +769,7 @@ message UpdateCollectionClusterSetupRequest {
CreateShardKey create_shard_key = 7;
DeleteShardKey delete_shard_key = 8;
RestartTransfer restart_transfer = 9;
ReplicatePoints replicate_points = 10;
}
optional uint64 timeout = 6; // Wait timeout for operation commit in seconds, if not specified - default value will be supplied
}
Expand Down
142 changes: 142 additions & 0 deletions packages/js-client-grpc/proto/common.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
syntax = "proto3";
package qdrant;

option csharp_namespace = "Qdrant.Client.Grpc";
option java_outer_classname = "Points";

import "google/protobuf/timestamp.proto";

message PointId {
oneof point_id_options {
uint64 num = 1; // Numerical ID of the point
string uuid = 2; // UUID
}
}

message GeoPoint {
double lon = 1;
double lat = 2;
}

message Filter {
repeated Condition should = 1; // At least one of those conditions should match
repeated Condition must = 2; // All conditions must match
repeated Condition must_not = 3; // All conditions must NOT match
optional MinShould min_should = 4; // At least minimum amount of given conditions should match
}

message MinShould {
repeated Condition conditions = 1;
uint64 min_count = 2;
}

message Condition {
oneof condition_one_of {
FieldCondition field = 1;
IsEmptyCondition is_empty = 2;
HasIdCondition has_id = 3;
Filter filter = 4;
IsNullCondition is_null = 5;
NestedCondition nested = 6;
HasVectorCondition has_vector = 7;
}
}

message IsEmptyCondition {
string key = 1;
}

message IsNullCondition {
string key = 1;
}

message HasIdCondition {
repeated PointId has_id = 1;
}

message HasVectorCondition {
string has_vector = 1;
}

message NestedCondition {
string key = 1; // Path to nested object
Filter filter = 2; // Filter condition
}

message FieldCondition {
string key = 1;
Match match = 2; // Check if point has field with a given value
Range range = 3; // Check if points value lies in a given range
GeoBoundingBox geo_bounding_box = 4; // Check if points geolocation lies in a given area
GeoRadius geo_radius = 5; // Check if geo point is within a given radius
ValuesCount values_count = 6; // Check number of values for a specific field
GeoPolygon geo_polygon = 7; // Check if geo point is within a given polygon
DatetimeRange datetime_range = 8; // Check if datetime is within a given range
optional bool is_empty = 9; // Check if field is empty
optional bool is_null = 10; // Check if field is null
}

message Match {
oneof match_value {
string keyword = 1; // Match string keyword
int64 integer = 2; // Match integer
bool boolean = 3; // Match boolean
string text = 4; // Match text
RepeatedStrings keywords = 5; // Match multiple keywords
RepeatedIntegers integers = 6; // Match multiple integers
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
}
}

message RepeatedStrings {
repeated string strings = 1;
}

message RepeatedIntegers {
repeated int64 integers = 1;
}

message Range {
optional double lt = 1;
optional double gt = 2;
optional double gte = 3;
optional double lte = 4;
}

message DatetimeRange {
optional google.protobuf.Timestamp lt = 1;
optional google.protobuf.Timestamp gt = 2;
optional google.protobuf.Timestamp gte = 3;
optional google.protobuf.Timestamp lte = 4;
}

message GeoBoundingBox {
GeoPoint top_left = 1; // north-west corner
GeoPoint bottom_right = 2; // south-east corner
}

message GeoRadius {
GeoPoint center = 1; // Center of the circle
float radius = 2; // In meters
}

message GeoLineString {
repeated GeoPoint points = 1; // Ordered sequence of GeoPoints representing the line
}

// 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.
message GeoPolygon {
GeoLineString exterior = 1; // The exterior line bounds the surface
repeated GeoLineString interiors = 2; // Interior lines (if present) bound holes within the surface
}

message ValuesCount {
optional uint64 lt = 1;
optional uint64 gt = 2;
optional uint64 gte = 3;
optional uint64 lte = 4;
}
145 changes: 1 addition & 144 deletions packages/js-client-grpc/proto/points.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package qdrant;
option csharp_namespace = "Qdrant.Client.Grpc";

import "collections.proto";
import "common.proto";
import "google/protobuf/timestamp.proto";
import "json_with_int.proto";

Expand Down Expand Up @@ -31,17 +32,6 @@ message ReadConsistency {
}
}

// ---------------------------------------------
// ------------- Point Id Requests -------------
// ---------------------------------------------

message PointId {
oneof point_id_options {
uint64 num = 1; // Numerical ID of the point
string uuid = 2; // UUID
}
}

message SparseIndices {
repeated uint32 data = 1;
}
Expand Down Expand Up @@ -1075,133 +1065,6 @@ message SearchMatrixOffsetsResponse {
optional Usage usage = 3;
}

// ---------------------------------------------
// ------------- Filter Conditions -------------
// ---------------------------------------------

message Filter {
repeated Condition should = 1; // At least one of those conditions should match
repeated Condition must = 2; // All conditions must match
repeated Condition must_not = 3; // All conditions must NOT match
optional MinShould min_should = 4; // At least minimum amount of given conditions should match
}

message MinShould {
repeated Condition conditions = 1;
uint64 min_count = 2;
}

message Condition {
oneof condition_one_of {
FieldCondition field = 1;
IsEmptyCondition is_empty = 2;
HasIdCondition has_id = 3;
Filter filter = 4;
IsNullCondition is_null = 5;
NestedCondition nested = 6;
HasVectorCondition has_vector = 7;
}
}

message IsEmptyCondition {
string key = 1;
}

message IsNullCondition {
string key = 1;
}

message HasIdCondition {
repeated PointId has_id = 1;
}

message HasVectorCondition {
string has_vector = 1;
}

message NestedCondition {
string key = 1; // Path to nested object
Filter filter = 2; // Filter condition
}

message FieldCondition {
string key = 1;
Match match = 2; // Check if point has field with a given value
Range range = 3; // Check if points value lies in a given range
GeoBoundingBox geo_bounding_box = 4; // Check if points geolocation lies in a given area
GeoRadius geo_radius = 5; // Check if geo point is within a given radius
ValuesCount values_count = 6; // Check number of values for a specific field
GeoPolygon geo_polygon = 7; // Check if geo point is within a given polygon
DatetimeRange datetime_range = 8; // Check if datetime is within a given range
optional bool is_empty = 9; // Check if field is empty
optional bool is_null = 10; // Check if field is null
}

message Match {
oneof match_value {
string keyword = 1; // Match string keyword
int64 integer = 2; // Match integer
bool boolean = 3; // Match boolean
string text = 4; // Match text
RepeatedStrings keywords = 5; // Match multiple keywords
RepeatedIntegers integers = 6; // Match multiple integers
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
}
}

message RepeatedStrings {
repeated string strings = 1;
}

message RepeatedIntegers {
repeated int64 integers = 1;
}

message Range {
optional double lt = 1;
optional double gt = 2;
optional double gte = 3;
optional double lte = 4;
}

message DatetimeRange {
optional google.protobuf.Timestamp lt = 1;
optional google.protobuf.Timestamp gt = 2;
optional google.protobuf.Timestamp gte = 3;
optional google.protobuf.Timestamp lte = 4;
}

message GeoBoundingBox {
GeoPoint top_left = 1; // north-west corner
GeoPoint bottom_right = 2; // south-east corner
}

message GeoRadius {
GeoPoint center = 1; // Center of the circle
float radius = 2; // In meters
}

message GeoLineString {
repeated GeoPoint points = 1; // Ordered sequence of GeoPoints representing the line
}

// 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.
message GeoPolygon {
GeoLineString exterior = 1; // The exterior line bounds the surface
repeated GeoLineString interiors = 2; // Interior lines (if present) bound holes within the surface
}

message ValuesCount {
optional uint64 lt = 1;
optional uint64 gt = 2;
optional uint64 gte = 3;
optional uint64 lte = 4;
}

// ---------------------------------------------
// -------------- Points Selector --------------
// ---------------------------------------------
Expand Down Expand Up @@ -1229,12 +1092,6 @@ message PointStruct {
optional Vectors vectors = 4;
}


message GeoPoint {
double lon = 1;
double lat = 2;
}

// ---------------------------------------------
// ----------- Measurements collector ----------
// ---------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion packages/js-client-grpc/src/client-version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const PACKAGE_VERSION = '1.15.1';
export const PACKAGE_VERSION = '1.16.0';

interface Version {
major: number;
Expand Down
Loading
Loading