@@ -4,6 +4,7 @@ package qdrant;
44option csharp_namespace = "Qdrant.Client.Grpc" ;
55
66import "json_with_int.proto" ;
7+ import "google/protobuf/timestamp.proto" ;
78
89enum Datatype {
910 Default = 0 ;
@@ -12,6 +13,149 @@ enum Datatype {
1213 Float16 = 3 ;
1314}
1415
16+ message PointId {
17+ oneof point_id_options {
18+ uint64 num = 1 ; // Numerical ID of the point
19+ string uuid = 2 ; // UUID
20+ }
21+ }
22+
23+ message GeoPoint {
24+ double lon = 1 ;
25+ double lat = 2 ;
26+ }
27+
28+ // ---------------------------------------------
29+ // ------------- Filter Conditions -------------
30+ // ---------------------------------------------
31+
32+ message Filter {
33+ repeated Condition should = 1 ; // At least one of those conditions should match
34+ repeated Condition must = 2 ; // All conditions must match
35+ repeated Condition must_not = 3 ; // All conditions must NOT match
36+ optional MinShould min_should = 4 ; // At least minimum amount of given conditions should match
37+ }
38+
39+ message MinShould {
40+ repeated Condition conditions = 1 ;
41+ uint64 min_count = 2 ;
42+ }
43+
44+ message Condition {
45+ oneof condition_one_of {
46+ FieldCondition field = 1 ;
47+ IsEmptyCondition is_empty = 2 ;
48+ HasIdCondition has_id = 3 ;
49+ Filter filter = 4 ;
50+ IsNullCondition is_null = 5 ;
51+ NestedCondition nested = 6 ;
52+ HasVectorCondition has_vector = 7 ;
53+ }
54+ }
55+
56+ message IsEmptyCondition {
57+ string key = 1 ;
58+ }
59+
60+ message IsNullCondition {
61+ string key = 1 ;
62+ }
63+
64+ message HasIdCondition {
65+ repeated PointId has_id = 1 ;
66+ }
67+
68+ message HasVectorCondition {
69+ string has_vector = 1 ;
70+ }
71+
72+ message NestedCondition {
73+ string key = 1 ; // Path to nested object
74+ Filter filter = 2 ; // Filter condition
75+ }
76+
77+ message FieldCondition {
78+ string key = 1 ;
79+ Match match = 2 ; // Check if point has field with a given value
80+ Range range = 3 ; // Check if points value lies in a given range
81+ GeoBoundingBox geo_bounding_box = 4 ; // Check if points geolocation lies in a given area
82+ GeoRadius geo_radius = 5 ; // Check if geo point is within a given radius
83+ ValuesCount values_count = 6 ; // Check number of values for a specific field
84+ GeoPolygon geo_polygon = 7 ; // Check if geo point is within a given polygon
85+ DatetimeRange datetime_range = 8 ; // Check if datetime is within a given range
86+ optional bool is_empty = 9 ; // Check if field is empty
87+ optional bool is_null = 10 ; // Check if field is null
88+ }
89+
90+ message Match {
91+ oneof match_value {
92+ string keyword = 1 ; // Match string keyword
93+ int64 integer = 2 ; // Match integer
94+ bool boolean = 3 ; // Match boolean
95+ string text = 4 ; // Match text
96+ RepeatedStrings keywords = 5 ; // Match multiple keywords
97+ RepeatedIntegers integers = 6 ; // Match multiple integers
98+ RepeatedIntegers except_integers = 7 ; // Match any other value except those integers
99+ RepeatedStrings except_keywords = 8 ; // Match any other value except those keywords
100+ string phrase = 9 ; // Match phrase text
101+ string text_any = 10 ; // Match any word in the text
102+ }
103+ }
104+
105+ message RepeatedStrings {
106+ repeated string strings = 1 ;
107+ }
108+
109+ message RepeatedIntegers {
110+ repeated int64 integers = 1 ;
111+ }
112+
113+ message Range {
114+ optional double lt = 1 ;
115+ optional double gt = 2 ;
116+ optional double gte = 3 ;
117+ optional double lte = 4 ;
118+ }
119+
120+ message DatetimeRange {
121+ optional google.protobuf.Timestamp lt = 1 ;
122+ optional google.protobuf.Timestamp gt = 2 ;
123+ optional google.protobuf.Timestamp gte = 3 ;
124+ optional google.protobuf.Timestamp lte = 4 ;
125+ }
126+
127+ message GeoBoundingBox {
128+ GeoPoint top_left = 1 ; // north-west corner
129+ GeoPoint bottom_right = 2 ; // south-east corner
130+ }
131+
132+ message GeoRadius {
133+ GeoPoint center = 1 ; // Center of the circle
134+ float radius = 2 ; // In meters
135+ }
136+
137+ message GeoLineString {
138+ repeated GeoPoint points = 1 ; // Ordered sequence of GeoPoints representing the line
139+ }
140+
141+ // For a valid GeoPolygon, both the exterior and interior GeoLineStrings must consist of a minimum of 4 points.
142+ // Additionally, the first and last points of each GeoLineString must be the same.
143+ message GeoPolygon {
144+ GeoLineString exterior = 1 ; // The exterior line bounds the surface
145+ repeated GeoLineString interiors = 2 ; // Interior lines (if present) bound holes within the surface
146+ }
147+
148+ message ValuesCount {
149+ optional uint64 lt = 1 ;
150+ optional uint64 gt = 2 ;
151+ optional uint64 gte = 3 ;
152+ optional uint64 lte = 4 ;
153+ }
154+
155+ // ---------------------------------------------
156+ // ------------- Collection Config -------------
157+ // ---------------------------------------------
158+
15159message VectorParams {
16160 uint64 size = 1 ; // Size of the vectors
17161 Distance distance = 2 ; // Distance function used for comparing vectors
@@ -724,6 +868,12 @@ message RestartTransfer {
724868 ShardTransferMethod method = 4 ;
725869}
726870
871+ message ReplicatePoints {
872+ ShardKey from_shard_key = 1 ; // Source shard key
873+ ShardKey to_shard_key = 2 ; // Target shard key
874+ optional Filter filter = 3 ; // If set - only points matching the filter will be replicated
875+ }
876+
727877enum ShardTransferMethod {
728878 StreamRecords = 0 ; // Stream shard records in batches
729879 Snapshot = 1 ; // Snapshot the shard and recover it on the target peer
@@ -758,6 +908,7 @@ message UpdateCollectionClusterSetupRequest {
758908 CreateShardKey create_shard_key = 7 ;
759909 DeleteShardKey delete_shard_key = 8 ;
760910 RestartTransfer restart_transfer = 9 ;
911+ ReplicatePoints replicate_points = 10 ;
761912 }
762913 optional uint64 timeout = 6 ; // Wait timeout for operation commit in seconds, if not specified - default value will be supplied
763914}
0 commit comments