File size: 44,641 Bytes
84d2a97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
syntax = "proto3";

package qdrant;
option csharp_namespace = "Qdrant.Client.Grpc";

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


enum WriteOrderingType {
  Weak = 0; // Write operations may be reordered, works faster, default
  Medium = 1; // Write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change
  Strong = 2; // Write operations go through the permanent leader, consistent, but may be unavailable if leader is down
}

message WriteOrdering {
  WriteOrderingType type = 1; // Write ordering guarantees
}

enum ReadConsistencyType {
  All = 0; // Send request to all nodes and return points which are present on all of them
  Majority = 1; // Send requests to all nodes and return points which are present on majority of them
  Quorum = 2; // Send requests to half + 1 nodes, return points which are present on all of them
}

message ReadConsistency {
  oneof value {
    ReadConsistencyType type = 1; // Common read consistency configurations
    uint64 factor = 2; // Send request to a specified number of nodes, and return points which are present on all of them
  }
}

// ---------------------------------------------
// ------------- 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;
}

message Document {
  string text = 1; // Text of the document
  string model = 3; // Model name
  map<string, Value> options = 4; // Model options
}

message Image {
  Value image = 1; // Image data, either base64 encoded or URL
  string model = 2; // Model name
  map<string, Value> options = 3; // Model options
}

message InferenceObject {
  Value object = 1; // Object to infer
  string model = 2; // Model name
  map<string, Value> options = 3; // Model options
}

// Legacy vector format, which determines the vector type by the configuration of its fields.
message Vector {
  repeated float data = 1; // Vector data (flatten for multi vectors), deprecated
  optional SparseIndices indices = 2; // Sparse indices for sparse vectors, deprecated
  optional uint32 vectors_count = 3; // Number of vectors per multi vector, deprecated
  oneof vector {
    DenseVector dense = 101; // Dense vector
    SparseVector sparse = 102; // Sparse vector
    MultiDenseVector multi_dense = 103; // Multi dense vector
    Document document = 104;
    Image image = 105;
    InferenceObject object = 106;
  }
}

message VectorOutput {
  repeated float data = 1; // Vector data (flatten for multi vectors), deprecated
  optional SparseIndices indices = 2; // Sparse indices for sparse vectors, deprecated
  optional uint32 vectors_count = 3; // Number of vectors per multi vector, deprecated
  oneof vector {
    DenseVector dense = 101; // Dense vector
    SparseVector sparse = 102; // Sparse vector
    MultiDenseVector multi_dense = 103; // Multi dense vector
  }
}

message DenseVector {
  repeated float data = 1;
}

message SparseVector {
  repeated float values = 1;
  repeated uint32 indices = 2;
}

message MultiDenseVector {
  repeated DenseVector vectors = 1;
}

// Vector type to be used in queries. Ids will be substituted with their corresponding vectors from the collection.
message VectorInput {
  oneof variant {
    PointId id = 1;
    DenseVector dense = 2;
    SparseVector sparse = 3;
    MultiDenseVector multi_dense = 4;
    Document document = 5;
    Image image = 6;
    InferenceObject object = 7;
  }
}

// ---------------------------------------------
// ----------------- ShardKeySelector ----------
// ---------------------------------------------

message ShardKeySelector {
  repeated ShardKey shard_keys = 1; // List of shard keys which should be used in the request
}


// ---------------------------------------------
// ---------------- RPC Requests ---------------
// ---------------------------------------------

message UpsertPoints {
  string collection_name = 1; // name of the collection
  optional bool wait = 2; // Wait until the changes have been applied?
  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
}

message DeletePoints {
  string collection_name = 1; // name of the collection
  optional bool wait = 2; // Wait until the changes have been applied?
  PointsSelector points = 3; // Affected points
  optional WriteOrdering ordering = 4; // Write ordering guarantees
  optional ShardKeySelector shard_key_selector = 5; // Option for custom sharding to specify used shard keys
}

message GetPoints {
  string collection_name = 1; // name of the collection
  repeated PointId ids = 2; // List of points to retrieve
  reserved 3; // deprecated "with_vector" field
  WithPayloadSelector with_payload = 4; // Options for specifying which payload to include or not
  optional WithVectorsSelector with_vectors = 5; // Options for specifying which vectors to include into response
  optional ReadConsistency read_consistency = 6; // Options for specifying read consistency guarantees
  optional ShardKeySelector shard_key_selector = 7; // Specify in which shards to look for the points, if not specified - look in all shards
  optional uint64 timeout = 8; // If set, overrides global timeout setting for this request. Unit is seconds.
}

message UpdatePointVectors {
  string collection_name = 1; // name of the collection
  optional bool wait = 2; // Wait until the changes have been applied?
  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
}

message PointVectors {
  PointId id = 1; // ID to update vectors for
  Vectors vectors = 2; // Named vectors to update, leave others intact
}

message DeletePointVectors {
  string collection_name = 1; // name of the collection
  optional bool wait = 2; // Wait until the changes have been applied?
  PointsSelector points_selector = 3; // Affected points
  VectorsSelector vectors = 4; // List of vector names to delete
  optional WriteOrdering ordering = 5; // Write ordering guarantees
  optional ShardKeySelector shard_key_selector = 6; // Option for custom sharding to specify used shard keys
}

message SetPayloadPoints {
  string collection_name = 1; // name of the collection
  optional bool wait = 2; // Wait until the changes have been applied?
  map<string, Value> payload = 3; // New payload values
  reserved 4; // List of point to modify, deprecated
  optional PointsSelector points_selector = 5; // Affected points
  optional WriteOrdering ordering = 6; // Write ordering guarantees
  optional ShardKeySelector shard_key_selector = 7; // Option for custom sharding to specify used shard keys
  optional string key = 8; // Option for indicate property of payload
}

message DeletePayloadPoints {
  string collection_name = 1; // name of the collection
  optional bool wait = 2; // Wait until the changes have been applied?
  repeated string keys = 3; // List of keys to delete
  reserved 4; // Affected points, deprecated
  optional PointsSelector points_selector = 5; // Affected points
  optional WriteOrdering ordering = 6; // Write ordering guarantees
  optional ShardKeySelector shard_key_selector = 7; // Option for custom sharding to specify used shard keys
}

message ClearPayloadPoints {
  string collection_name = 1; // name of the collection
  optional bool wait = 2; // Wait until the changes have been applied?
  PointsSelector points = 3; // Affected points
  optional WriteOrdering ordering = 4; // Write ordering guarantees
  optional ShardKeySelector shard_key_selector = 5; // Option for custom sharding to specify used shard keys
}

enum FieldType {
  FieldTypeKeyword = 0;
  FieldTypeInteger = 1;
  FieldTypeFloat = 2;
  FieldTypeGeo = 3;
  FieldTypeText = 4;
  FieldTypeBool = 5;
  FieldTypeDatetime = 6;
  FieldTypeUuid = 7;
}

message CreateFieldIndexCollection {
  string collection_name = 1; // name of the collection
  optional bool wait = 2; // Wait until the changes have been applied?
  string field_name = 3; // Field name to index
  optional FieldType field_type = 4; // Field type.
  optional PayloadIndexParams field_index_params = 5; // Payload index params.
  optional WriteOrdering ordering = 6; // Write ordering guarantees
}

message DeleteFieldIndexCollection {
  string collection_name = 1; // name of the collection
  optional bool wait = 2; // Wait until the changes have been applied?
  string field_name = 3; // Field name to delete
  optional WriteOrdering ordering = 4; // Write ordering guarantees
}

message PayloadIncludeSelector {
  repeated string fields = 1; // List of payload keys to include into result
}

message PayloadExcludeSelector {
  repeated string fields = 1; // List of payload keys to exclude from the result
}

message WithPayloadSelector {
  oneof selector_options {
    bool enable = 1; // If `true` - return all payload, if `false` - none
    PayloadIncludeSelector include = 2;
    PayloadExcludeSelector exclude = 3;
  }
}

message NamedVectors {
  map<string, Vector> vectors = 1;
}

message NamedVectorsOutput {
  map<string, VectorOutput> vectors = 1;
}

message Vectors {
  oneof vectors_options {
    Vector vector = 1;
    NamedVectors vectors = 2;
  }
}

message VectorsOutput {
  oneof vectors_options {
    VectorOutput vector = 1;
    NamedVectorsOutput vectors = 2;
  }
}

message VectorsSelector {
  repeated string names = 1; // List of vectors to include into result
}

message WithVectorsSelector {
  oneof selector_options {
    bool enable = 1; // If `true` - return all vectors, if `false` - none
    VectorsSelector include = 2; // List of payload keys to include into result
  }
}

message QuantizationSearchParams {
  /*
  If set to true, search will ignore quantized vector data
  */
  optional bool ignore = 1;

  /*
  If true, use original vectors to re-score top-k results. If ignored, qdrant decides automatically does rescore enabled or not.
  */
  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 {
  /*
  Params relevant to HNSW index. Size of the beam in a beam-search.
  Larger the value - more accurate the result, more time required for search.
  */
  optional uint64 hnsw_ef = 1;

  /*
  Search without approximation. If set to true, search may run long but with exact results.
  */
  optional bool exact = 2;

  /*
  If set to true, search will ignore quantized vector data
  */
  optional QuantizationSearchParams quantization = 3;
  /*
  If enabled, the engine will only perform search among indexed or small segments.
  Using this option prevents slow searches in case of delayed index, but does not
  guarantee that all uploaded vectors will be included in search results
  */
  optional bool indexed_only = 4;
}

message SearchPoints {
  string collection_name = 1; // name of the collection
  repeated float vector = 2; // vector
  Filter filter = 3; // Filter conditions - return only those points that satisfy the specified conditions
  uint64 limit = 4; // Max number of result
  reserved 5; // deprecated "with_vector" field
  WithPayloadSelector with_payload = 6; // Options for specifying which payload to include or not
  SearchParams params = 7; // Search config
  optional float score_threshold = 8; // If provided - cut off results with worse scores
  optional uint64 offset = 9; // Offset of the result
  optional string vector_name = 10; // Which vector to use for search, if not specified - use default vector
  optional WithVectorsSelector with_vectors = 11; // Options for specifying which vectors to include into response
  optional ReadConsistency read_consistency = 12; // Options for specifying read consistency guarantees
  optional uint64 timeout = 13; // If set, overrides global timeout setting for this request. Unit is seconds.
  optional ShardKeySelector shard_key_selector = 14; // Specify in which shards to look for the points, if not specified - look in all shards
  optional SparseIndices sparse_indices = 15;
}

message SearchBatchPoints {
  string collection_name = 1; // Name of the collection
  repeated SearchPoints search_points = 2;
  optional ReadConsistency read_consistency = 3; // Options for specifying read consistency guarantees
  optional uint64 timeout = 4; // If set, overrides global timeout setting for this request. Unit is seconds.
}

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
  Filter filter = 3; // Filter conditions - return only those points that satisfy the specified conditions
  uint32 limit = 4; // Max number of result
  WithPayloadSelector with_payload = 5; // Options for specifying which payload to include or not
  SearchParams params = 6; // Search config
  optional float score_threshold = 7; // If provided - cut off results with worse scores
  optional string vector_name = 8; // Which vector to use for search, if not specified - use default vector
  optional WithVectorsSelector with_vectors = 9; // Options for specifying which vectors to include into response
  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
  optional uint64 timeout = 14; // If set, overrides global timeout setting for this request. Unit is seconds.
  optional ShardKeySelector shard_key_selector = 15; // Specify in which shards to look for the points, if not specified - look in all shards
  optional SparseIndices sparse_indices = 16;
}

enum Direction {
  Asc = 0;
  Desc = 1;
}

message StartFrom {
  oneof value {
    double float = 1;
    int64 integer = 2;
    google.protobuf.Timestamp timestamp = 3;
    string datetime = 4;
  }
}

message OrderBy {
  string key = 1; // Payload key to order by
  optional Direction direction = 2; // Ascending or descending order
  optional StartFrom start_from = 3; // Start from this value
}

message ScrollPoints {
  string collection_name = 1;
  Filter filter = 2; // Filter conditions - return only those points that satisfy the specified conditions
  optional PointId offset = 3; // Start with this ID
  optional uint32 limit = 4; // Max number of result
  reserved 5; // deprecated "with_vector" field
  WithPayloadSelector with_payload = 6; // Options for specifying which payload to include or not
  optional WithVectorsSelector with_vectors = 7; // Options for specifying which vectors to include into response
  optional ReadConsistency read_consistency = 8; // Options for specifying read consistency guarantees
  optional ShardKeySelector shard_key_selector = 9; // Specify in which shards to look for the points, if not specified - look in all shards
  optional OrderBy order_by = 10; // Order the records by a payload field
  optional uint64 timeout = 11; // If set, overrides global timeout setting for this request. Unit is seconds.
}

// How to use positive and negative vectors to find the results, default is `AverageVector`.
enum RecommendStrategy {
  // Average positive and negative vectors and create a single query with the formula
  // `query = avg_pos + avg_pos - avg_neg`. Then performs normal search.
  AverageVector = 0;

  // Uses custom search objective. Each candidate is compared against all
  // examples, its score is then chosen from the `max(max_pos_score, max_neg_score)`.
  // If the `max_neg_score` is chosen then it is squared and negated.
  BestScore = 1;
}

message LookupLocation {
  string collection_name = 1;
  optional string vector_name = 2; // Which vector to use for search, if not specified - use default vector
  optional ShardKeySelector shard_key_selector = 3; // Specify in which shards to look for the points, if not specified - look in all shards
}

message RecommendPoints {
  string collection_name = 1; // name of the collection
  repeated PointId positive = 2; // Look for vectors closest to the vectors from these points
  repeated PointId negative = 3; // Try to avoid vectors like the vector from these points
  Filter filter = 4; // Filter conditions - return only those points that satisfy the specified conditions
  uint64 limit = 5; // Max number of result
  reserved 6; // deprecated "with_vector" field
  WithPayloadSelector with_payload = 7; // Options for specifying which payload to include or not
  SearchParams params = 8; // Search config
  optional float score_threshold = 9; // If provided - cut off results with worse scores
  optional uint64 offset = 10; // Offset of the result
  optional string using = 11; // Define which vector to use for recommendation, if not specified - default vector
  optional WithVectorsSelector with_vectors = 12; // Options for specifying which vectors to include into response
  optional LookupLocation lookup_from = 13; // Name of the collection to use for points lookup, if not specified - use current collection
  optional ReadConsistency read_consistency = 14; // Options for specifying read consistency guarantees
  optional RecommendStrategy strategy = 16; // How to use the example vectors to find the results
  repeated Vector positive_vectors = 17; // Look for vectors closest to those
  repeated Vector negative_vectors = 18; // Try to avoid vectors like this
  optional uint64 timeout = 19; // If set, overrides global timeout setting for this request. Unit is seconds.
  optional ShardKeySelector shard_key_selector = 20; // Specify in which shards to look for the points, if not specified - look in all shards
}

message RecommendBatchPoints {
  string collection_name = 1; // Name of the collection
  repeated RecommendPoints recommend_points = 2;
  optional ReadConsistency read_consistency = 3; // Options for specifying read consistency guarantees
  optional uint64 timeout = 4; // If set, overrides global timeout setting for this request. Unit is seconds.
}

message RecommendPointGroups {
  string collection_name = 1; // Name of the collection
  repeated PointId positive = 2; // Look for vectors closest to the vectors from these points
  repeated PointId negative = 3; // Try to avoid vectors like the vector from these points
  Filter filter = 4; // Filter conditions - return only those points that satisfy the specified conditions
  uint32 limit = 5; // Max number of groups in result
  WithPayloadSelector with_payload = 6; // Options for specifying which payload to include or not
  SearchParams params = 7; // Search config
  optional float score_threshold = 8; // If provided - cut off results with worse scores
  optional string using = 9; // Define which vector to use for recommendation, if not specified - default vector
  optional WithVectorsSelector with_vectors = 10; // Options for specifying which vectors to include into response
  optional LookupLocation lookup_from = 11; // Name of the collection to use for points lookup, if not specified - use current collection
  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
  optional RecommendStrategy strategy = 17; // How to use the example vectors to find the results
  repeated Vector positive_vectors = 18; // Look for vectors closest to those
  repeated Vector negative_vectors = 19; // Try to avoid vectors like this
  optional uint64 timeout = 20; // If set, overrides global timeout setting for this request. Unit is seconds.
  optional ShardKeySelector shard_key_selector = 21; // Specify in which shards to look for the points, if not specified - look in all shards
}

message TargetVector {
  oneof target {
    VectorExample single = 1;

    // leaving extensibility for possibly adding multi-target
  }
}

message VectorExample {
  oneof example {
    PointId id = 1;
    Vector vector = 2;
  }
}

message ContextExamplePair {
  VectorExample positive = 1;
  VectorExample negative = 2;
}

message DiscoverPoints {
  string collection_name = 1; // name of the collection
  TargetVector target = 2; // Use this as the primary search objective
  repeated ContextExamplePair context = 3; // Search will be constrained by these pairs of examples
  Filter filter = 4; // Filter conditions - return only those points that satisfy the specified conditions
  uint64 limit = 5; // Max number of result
  WithPayloadSelector with_payload = 6; // Options for specifying which payload to include or not
  SearchParams params = 7; // Search config
  optional uint64 offset = 8; // Offset of the result
  optional string using = 9; // Define which vector to use for recommendation, if not specified - default vector
  optional WithVectorsSelector with_vectors = 10; // Options for specifying which vectors to include into response
  optional LookupLocation lookup_from = 11; // Name of the collection to use for points lookup, if not specified - use current collection
  optional ReadConsistency read_consistency = 12; // Options for specifying read consistency guarantees
  optional uint64 timeout = 13; // If set, overrides global timeout setting for this request. Unit is seconds.
  optional ShardKeySelector shard_key_selector = 14; // Specify in which shards to look for the points, if not specified - look in all shards
}

message DiscoverBatchPoints {
  string collection_name = 1; // Name of the collection
  repeated DiscoverPoints discover_points = 2;
  optional ReadConsistency read_consistency = 3; // Options for specifying read consistency guarantees
  optional uint64 timeout = 4; // If set, overrides global timeout setting for this request. Unit is seconds.
}

message CountPoints {
  string collection_name = 1; // Name of the collection
  Filter filter = 2; // Filter conditions - return only those points that satisfy the specified conditions
  optional bool exact = 3; // If `true` - return exact count, if `false` - return approximate count
  optional ReadConsistency read_consistency = 4; // Options for specifying read consistency guarantees
  optional ShardKeySelector shard_key_selector = 5; // Specify in which shards to look for the points, if not specified - look in all shards
   optional uint64 timeout = 6; // If set, overrides global timeout setting for this request. Unit is seconds.
}

message RecommendInput {
  repeated VectorInput positive = 1; // Look for vectors closest to the vectors from these points
  repeated VectorInput negative = 2; // Try to avoid vectors like the vector from these points
  optional RecommendStrategy strategy = 3; // How to use the provided vectors to find the results
}

message ContextInputPair {
  VectorInput positive = 1; // A positive vector
  VectorInput negative = 2; // Repel from this vector
}

message DiscoverInput {
  VectorInput target = 1; // Use this as the primary search objective
  ContextInput context = 2; // Search space will be constrained by these pairs of vectors
}

message ContextInput {
    repeated ContextInputPair pairs = 1; // Search space will be constrained by these pairs of vectors
}

enum Fusion {
    RRF = 0; // Reciprocal Rank Fusion
    DBSF = 1; // Distribution-Based Score Fusion
}

// Sample points from the collection
//
// Available sampling methods:
//
// * `random` - Random sampling
enum Sample {
    Random = 0;
}

message Query {
  oneof variant {
    VectorInput nearest = 1; // Find the nearest neighbors to this vector.
    RecommendInput recommend = 2; // Use multiple positive and negative vectors to find the results.
    DiscoverInput discover = 3; // Search for nearest points, but constrain the search space with context
    ContextInput context = 4; // Return points that live in positive areas.
    OrderBy order_by = 5; // Order the points by a payload field.
    Fusion fusion = 6; // Fuse the results of multiple prefetches.
    Sample sample = 7; // Sample points from the collection.
  }
}

message PrefetchQuery {
  repeated PrefetchQuery prefetch = 1; // Sub-requests to perform first. If present, the query will be performed on the results of the prefetches.
  optional Query query = 2; // Query to perform. If missing, returns points ordered by their IDs.
  optional string using = 3; // Define which vector to use for querying. If missing, the default vector is is used.
  optional Filter filter = 4; // Filter conditions - return only those points that satisfy the specified conditions.
  optional SearchParams params = 5; // Search params for when there is no prefetch.
  optional float score_threshold = 6; // Return points with scores better than this threshold.
  optional uint64 limit = 7; // Max number of points. Default is 10
  optional LookupLocation lookup_from = 8; // The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector
}

message QueryPoints {
  string collection_name = 1; // Name of the collection
  repeated PrefetchQuery prefetch = 2; // Sub-requests to perform first. If present, the query will be performed on the results of the prefetches.
  optional Query query = 3; // Query to perform. If missing, returns points ordered by their IDs.
  optional string using = 4; // Define which vector to use for querying. If missing, the default vector is used.
  optional Filter filter = 5; // Filter conditions - return only those points that satisfy the specified conditions.
  optional SearchParams params = 6; // Search params for when there is no prefetch.
  optional float score_threshold = 7; // Return points with scores better than this threshold.
  optional uint64 limit = 8; // Max number of points. Default is 10.
  optional uint64 offset = 9; // Offset of the result. Skip this many points. Default is 0.
  optional WithVectorsSelector with_vectors = 10; // Options for specifying which vectors to include into the response.
  optional WithPayloadSelector with_payload = 11; // Options for specifying which payload to include or not.
  optional ReadConsistency read_consistency = 12; // Options for specifying read consistency guarantees.
  optional ShardKeySelector shard_key_selector = 13; // Specify in which shards to look for the points, if not specified - look in all shards.
  optional LookupLocation lookup_from = 14; // The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector
  optional uint64 timeout = 15; // If set, overrides global timeout setting for this request. Unit is seconds.
}

message QueryBatchPoints {
  string collection_name = 1;
  repeated QueryPoints query_points = 2;
  optional ReadConsistency read_consistency = 3; // Options for specifying read consistency guarantees
  optional uint64 timeout = 4; // If set, overrides global timeout setting for this request. Unit is seconds.
}

message QueryPointGroups {
  string collection_name = 1; // Name of the collection
  repeated PrefetchQuery prefetch = 2; // Sub-requests to perform first. If present, the query will be performed on the results of the prefetches.
  optional Query query = 3; // Query to perform. If missing, returns points ordered by their IDs.
  optional string using = 4; // Define which vector to use for querying. If missing, the default vector is used.
  optional Filter filter = 5; // Filter conditions - return only those points that satisfy the specified conditions.
  optional SearchParams params = 6; // Search params for when there is no prefetch.
  optional float score_threshold = 7; // Return points with scores better than this threshold.
  WithPayloadSelector with_payload = 8; // Options for specifying which payload to include or not
  optional WithVectorsSelector with_vectors = 9; // Options for specifying which vectors to include into response
  optional LookupLocation lookup_from = 10; // The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector
  optional uint64 limit = 11; // Max number of points. Default is 3.
  optional uint64 group_size = 12; // Maximum amount of points to return per group. Default to 10.
  string group_by = 13; // 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.
  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
  optional uint64 timeout = 16; // If set, overrides global timeout setting for this request. Unit is seconds.
  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 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;
    optional ShardKeySelector shard_key_selector = 2; // Option for custom sharding to specify used shard keys
  }
  message SetPayload {
      map<string, Value> payload = 1;
      optional PointsSelector points_selector = 2; // Affected points
      optional ShardKeySelector shard_key_selector = 3; // Option for custom sharding to specify used shard keys
      optional string key = 4; // Option for indicate property of payload
  }
  message OverwritePayload {
      map<string, Value> payload = 1;
      optional PointsSelector points_selector = 2; // Affected points
      optional ShardKeySelector shard_key_selector = 3; // Option for custom sharding to specify used shard keys
      optional string key = 4; // Option for indicate property of payload
  }
  message DeletePayload {
      repeated string keys = 1;
      optional PointsSelector points_selector = 2; // Affected points
      optional ShardKeySelector shard_key_selector = 3; // Option for custom sharding to specify used shard keys
  }
  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
  }
  message DeleteVectors {
    PointsSelector points_selector = 1; // Affected points
    VectorsSelector vectors = 2; // List of vector names to delete
    optional ShardKeySelector shard_key_selector = 3; // Option for custom sharding to specify used shard keys
  }
  message DeletePoints {
    PointsSelector points = 1; // Affected points
    optional ShardKeySelector shard_key_selector = 2; // Option for custom sharding to specify used shard keys
  }
  message ClearPayload {
    PointsSelector points = 1; // Affected points
    optional ShardKeySelector shard_key_selector = 2; // Option for custom sharding to specify used shard keys
  }

  oneof operation {
    PointStructList upsert = 1;
    PointsSelector delete_deprecated = 2 [deprecated=true];
    SetPayload set_payload = 3;
    OverwritePayload overwrite_payload = 4;
    DeletePayload delete_payload = 5;
    PointsSelector clear_payload_deprecated = 6 [deprecated=true];
    UpdateVectors update_vectors = 7;
    DeleteVectors delete_vectors = 8;
    DeletePoints delete_points = 9;
    ClearPayload clear_payload = 10;
  }
}

message UpdateBatchPoints {
  string collection_name = 1; // name of the collection
  optional bool wait = 2; // Wait until the changes have been applied?
  repeated PointsUpdateOperation operations = 3;
  optional WriteOrdering ordering = 4; // Write ordering guarantees
}

// ---------------------------------------------
// ---------------- RPC Response ---------------
// ---------------------------------------------

message PointsOperationResponse {
  UpdateResult result = 1;
  double time = 2; // Time spent to process
}

message UpdateResult {
  optional uint64 operation_id = 1; // Number of operation
  UpdateStatus status = 2; // Operation status
}

enum UpdateStatus {
  UnknownUpdateStatus = 0;
  Acknowledged = 1; // Update is received, but not processed yet
  Completed = 2; // Update is applied and ready for search
  ClockRejected = 3; // Internal: update is rejected due to an outdated clock
}

message OrderValue {
  oneof variant {
    int64 int = 1;
    double float = 2;
  }
}

message ScoredPoint {
  PointId id = 1; // Point id
  map<string, Value> payload = 2; // Payload
  float score = 3; // Similarity score
  reserved 4; // deprecated "vector" field
  uint64 version = 5; // Last update operation applied to this point
  optional VectorsOutput vectors = 6; // Vectors to search
  optional ShardKey shard_key = 7; // Shard key
  optional OrderValue order_value = 8; // Order by value
}

message GroupId {
  oneof kind {
    // Represents a double value.
    uint64 unsigned_value = 1;
    // Represents an integer value
    int64 integer_value = 2;
    // Represents a string value.
    string string_value = 3;
  }
}

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

message GroupsResult {
  repeated PointGroup groups = 1; // Groups
}

message SearchResponse {
  repeated ScoredPoint result = 1;
  double time = 2; // Time spent to process
  optional HardwareUsage usage = 3;
}

message QueryResponse {
  repeated ScoredPoint result = 1;
  double time = 2; // Time spent to process
  optional HardwareUsage usage = 3;
}

message QueryBatchResponse {
  repeated BatchResult result = 1;
  double time = 2; // Time spent to process
  optional HardwareUsage usage = 3;
}

message QueryGroupsResponse {
  GroupsResult result = 1;
  double time = 2; // Time spent to process
  optional HardwareUsage usage = 3;
}

message BatchResult {
  repeated ScoredPoint result = 1;
}

message SearchBatchResponse {
  repeated BatchResult result = 1;
  double time = 2; // Time spent to process
  optional HardwareUsage usage = 3;
}

message SearchGroupsResponse {
  GroupsResult result = 1;
  double time = 2; // Time spent to process
  optional HardwareUsage usage = 3;
}

message CountResponse {
  CountResult result = 1;
  double time = 2; // Time spent to process
  optional HardwareUsage usage = 3;
}

message ScrollResponse {
  optional PointId next_page_offset = 1; // Use this offset for the next query
  repeated RetrievedPoint result = 2;
  double time = 3; // Time spent to process
}

message CountResult {
  uint64 count = 1;
}

message RetrievedPoint {
  PointId id = 1;
  map<string, Value> payload = 2;
  reserved 3; // deprecated "vector" field
  optional VectorsOutput vectors = 4;
  optional ShardKey shard_key = 5; // Shard key
  optional OrderValue order_value = 6; // Order-by value
}

message GetResponse {
  repeated RetrievedPoint result = 1;
  double time = 2; // Time spent to process
}

message RecommendResponse {
  repeated ScoredPoint result = 1;
  double time = 2; // Time spent to process
  optional HardwareUsage usage = 3;
}

message RecommendBatchResponse {
  repeated BatchResult result = 1;
  double time = 2; // Time spent to process
  optional HardwareUsage usage = 3;
}

message DiscoverResponse {
  repeated ScoredPoint result = 1;
  double time = 2; // Time spent to process
  optional HardwareUsage usage = 3;
}

message DiscoverBatchResponse {
  repeated BatchResult result = 1;
  double time = 2; // Time spent to process
  optional HardwareUsage usage = 3;
}

message RecommendGroupsResponse {
  GroupsResult result = 1;
  double time = 2; // Time spent to process
  optional HardwareUsage usage = 3;
}

message UpdateBatchResponse {
  repeated UpdateResult result = 1;
  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
  optional HardwareUsage usage = 3;
}

message SearchMatrixOffsetsResponse {
  SearchMatrixOffsets result = 1;
  double time = 2; // Time spent to process
  optional HardwareUsage 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
}

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
  }
}

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 --------------
// ---------------------------------------------

message PointsSelector {
  oneof points_selector_one_of {
    PointsIdsList points = 1;
    Filter filter = 2;
  }
}

message PointsIdsList {
  repeated PointId ids = 1;
}

// ---------------------------------------------
// ------------------- Point -------------------
// ---------------------------------------------


message PointStruct {
  PointId id = 1;
  reserved 2; // deprecated "vector" field
  map<string, Value> payload = 3;
  optional Vectors vectors = 4;
}


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

// ---------------------------------------------
// ------------ Hardware measurements ----------
// ---------------------------------------------

message HardwareUsage {
  uint64 cpu = 1;
}