-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path00_quick_start.py
866 lines (767 loc) · 92.4 KB
/
00_quick_start.py
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
import os, json, time
from pymilvus import MilvusClient
CLUSTER_ENDPOINT="YOUR_CLUSTER_ENDPOINT" # Set your cluster endpoint
TOKEN="YOUR_CLUSTER_TOKEN" # Set your token
COLLECTION_NAME="medium_articles_2020" # Set your collection name
DATASET_PATH="{}/../medium_articles_2020_dpr.json".format(os.path.dirname(__file__)) # Set your dataset path
# 1. Initialize a MilvusClient instance
# Replace uri and API key with your own
client = MilvusClient(
uri=CLUSTER_ENDPOINT, # Cluster endpoint obtained from the console
token=TOKEN # API key or a colon-separated cluster username and password
)
# 2. Create a collection
client.create_collection(
collection_name=COLLECTION_NAME,
dimension=768
)
res = client.describe_collection(
collection_name=COLLECTION_NAME
)
print(res)
# Output
#
# {
# "collection_name": "medium_articles_2020",
# "auto_id": false,
# "num_shards": 1,
# "description": "",
# "fields": [
# {
# "field_id": 100,
# "name": "id",
# "description": "",
# "type": 5,
# "params": {},
# "element_type": 0,
# "is_primary": true
# },
# {
# "field_id": 101,
# "name": "vector",
# "description": "",
# "type": 101,
# "params": {
# "dim": 768
# },
# "element_type": 0
# }
# ],
# "aliases": [],
# "collection_id": 445766087115663107,
# "consistency_level": 2,
# "properties": {},
# "num_partitions": 1,
# "enable_dynamic_field": true
# }
# 3. Insert a single entity
res = client.insert(
collection_name=COLLECTION_NAME,
data={
'id': 0,
'title': 'The Reported Mortality Rate of Coronavirus Is Not Important',
'link': '<https://medium.com/swlh/the-reported-mortality-rate-of-coronavirus-is-not-important-369989c8d912>',
'reading_time': 13,
'publication': 'The Startup',
'claps': 1100,
'responses': 18,
'vector': [0.041732933, 0.013779674, -0.027564144, -0.013061441, 0.009748648, 0.00082446384, -0.00071647146, 0.048612226, -0.04836573, -0.04567751, 0.018008126, 0.0063936645, -0.011913628, 0.030776596, -0.018274948, 0.019929802, 0.020547243, 0.032735646, -0.031652678, -0.033816382, -0.051087562, -0.033748355, 0.0039493158, 0.009246126, -0.060236514, -0.017136049, 0.028754413, -0.008433934, 0.011168004, -0.012391256, -0.011225835, 0.031775184, 0.002929508, -0.007448661, -0.005337719, -0.010999258, -0.01515909, -0.005130484, 0.0060212007, 0.0034560722, -0.022935811, -0.04970116, -0.0155887455, 0.06627353, -0.006052789, -0.051570725, -0.109865054, 0.033205193, 0.00041118253, 0.0029823708, 0.036160238, -0.011256539, 0.00023560718, 0.058322437, 0.022275906, 0.015206677, -0.02884609, 0.0016338055, 0.0049200393, 0.014388571, -0.0049061654, -0.04664761, -0.027454877, 0.017526226, -0.005100602, 0.018090058, 0.02700998, 0.04031944, -0.0097965, -0.03674761, -0.0043163053, -0.023320708, 0.012654851, -0.014262311, -0.008081833, -0.018334744, 0.0014025003, -0.003053399, -0.002636383, -0.022398386, -0.004725274, 0.00036367847, -0.012368711, 0.0014739085, 0.03450414, 0.009684024, 0.017912658, 0.06594397, 0.021381201, 0.029343689, -0.0069561847, 0.026152428, 0.04635037, 0.014746184, -0.002119602, 0.034359712, -0.013705124, 0.010691518, 0.04060854, 0.013679299, -0.018990282, 0.035340093, 0.007353945, -0.035990074, 0.013126987, -0.032933377, -0.001756877, -0.0049658176, -0.03380879, -0.07024137, -0.0130426735, 0.010533265, -0.023091802, -0.004645729, -0.03344451, 0.04759929, 0.025985204, -0.040710885, -0.016681142, -0.024664842, -0.025170377, 0.08839205, -0.023733815, 0.019494494, 0.0055427826, 0.045460507, 0.07066554, 0.022181382, 0.018302314, 0.026806992, -0.006066003, 0.046525814, -0.04066389, 0.019001767, 0.021242762, -0.020784091, -0.031635042, 0.04573943, 0.02515421, -0.050663553, -0.05183343, -0.046468202, -0.07910535, 0.017036669, 0.021445233, 0.04277428, -0.020235524, -0.055314954, 0.00904601, -0.01104365, 0.03069203, -0.00821997, -0.035594665, 0.024322856, -0.0068963314, 0.009003657, 0.00398102, -0.008596356, 0.014772055, 0.02740991, 0.025503553, 0.0038213644, -0.0047855405, -0.034888722, 0.030553816, -0.008325959, 0.030010607, 0.023729775, 0.016138833, -0.022967983, -0.08616877, -0.02460819, -0.008210168, -0.06444098, 0.018750126, -0.03335763, 0.022024624, 0.032374356, 0.023870794, 0.021288997, -0.026617877, 0.020435361, -0.003692393, -0.024113296, 0.044870164, -0.030451361, 0.013022849, 0.002278627, -0.027616743, -0.012087787, -0.033232547, -0.022974484, 0.02801226, -0.029057292, 0.060317725, -0.02312559, 0.015558754, 0.073630534, 0.02490823, -0.0140531305, -0.043771528, 0.040756326, 0.01667925, -0.0046050115, -0.08938058, 0.10560781, 0.015044094, 0.003613817, 0.013523503, -0.011039813, 0.06396795, 0.013428416, -0.025031878, -0.014972648, -0.015970055, 0.037022553, -0.013759925, 0.013363354, 0.0039748577, -0.0040822625, 0.018209668, -0.057496265, 0.034993384, 0.07075411, 0.023498386, 0.085871644, 0.028646072, 0.007590898, 0.07037031, -0.05005178, 0.010477505, -0.014106617, 0.013402172, 0.007472563, -0.03131418, 0.020552127, -0.031878896, -0.04170217, -0.03153583, 0.03458349, 0.03366634, 0.021306382, -0.037176874, 0.029069472, 0.014662372, 0.0024123765, -0.025403008, -0.0372993, -0.049923114, -0.014209514, -0.015524425, 0.036377322, 0.04259327, -0.029715618, 0.02657093, -0.0062432447, -0.0024253451, -0.021287171, 0.010478781, -0.029322306, -0.021203341, 0.047209084, 0.025337176, 0.018471811, -0.008709492, -0.047414266, -0.06227469, -0.05713435, 0.02141101, 0.024481304, 0.07176469, 0.0211379, -0.049316987, -0.124073654, 0.0049275495, -0.02461509, -0.02738388, 0.04825289, -0.05069646, 0.012640115, -0.0061352802, 0.034599125, 0.02799496, -0.01511028, -0.046418104, 0.011309801, 0.016673129, -0.033531003, -0.049203333, -0.027218347, -0.03528408, 0.008881575, 0.010736325, 0.034232814, 0.012807507, -0.0100207105, 0.0067757815, 0.009538357, 0.026212366, -0.036120333, -0.019764563, 0.006527411, -0.016437015, -0.009759148, -0.042246807, 0.012492151, 0.0066206953, 0.010672299, -0.44499892, -0.036189068, -0.015703931, -0.031111298, -0.020329623, 0.0047888453, 0.090396516, -0.041484866, 0.033830352, -0.0033847596, 0.06065415, 0.030880837, 0.05558494, 0.022805553, 0.009607596, 0.006682602, 0.036806617, 0.02406229, 0.034229457, -0.0105605405, 0.034754273, 0.02436426, -0.03849325, 0.021132406, -0.01251386, 0.022090863, -0.029137045, 0.0064384523, -0.03175176, -0.0070441505, 0.016025176, -0.023172623, 0.00076795724, -0.024106828, -0.045440633, -0.0074440194, 0.00035374766, 0.024374487, 0.0058897804, -0.012461025, -0.029086761, 0.0029477053, -0.022914894, -0.032369837, 0.020743662, 0.024116345, 0.0020526652, 0.0008596536, -0.000583463, 0.061080184, 0.020812698, -0.0235381, 0.08112197, 0.05689626, -0.003070104, -0.010714772, -0.004864459, 0.027089117, -0.030910335, 0.0017404438, -0.014978656, 0.0127020255, 0.01878998, -0.051732827, -0.0037475713, 0.013033434, -0.023682894, -0.03219574, 0.03736345, 0.0058930484, -0.054040316, 0.047637977, 0.012636436, -0.05820182, 0.013828813, -0.057893142, -0.012405234, 0.030266648, -0.0029184038, -0.021839319, -0.045179468, -0.013123978, -0.021320488, 0.0015718226, 0.020244086, -0.014414709, 0.009535103, -0.004497577, -0.02577227, -0.0085017495, 0.029090486, 0.009356506, 0.0055838437, 0.021151636, 0.039531752, 0.07814674, 0.043186333, -0.0077368533, 0.028967595, 0.025058193, 0.05432941, -0.04383656, -0.027070394, -0.080263995, -0.03616516, -0.026129462, -0.0033627374, 0.035040155, 0.015231506, -0.06372076, 0.046391208, 0.0049725454, 0.003783345, -0.057800908, 0.061461, -0.017880175, 0.022820404, 0.048944063, 0.04725843, -0.013392871, 0.05023065, 0.0069421427, -0.019561166, 0.012953843, 0.06227977, -0.02114757, -0.003334329, 0.023241237, -0.061053444, -0.023145229, 0.016086273, 0.0774039, 0.008069459, -0.0013532874, -0.016790181, -0.027246375, -0.03254919, 0.033754334, 0.00037142826, -0.02387325, 0.0057056695, 0.0084914565, -0.051856343, 0.029254, 0.005583839, 0.011591886, -0.033027634, -0.004170374, 0.018334484, -0.0030969654, 0.0024489106, 0.0030196267, 0.023012564, 0.020529047, 0.00010772953, 0.0017700809, 0.029260442, -0.018829526, -0.024797931, -0.039499596, 0.008108761, -0.013099816, -0.11726566, -0.005652353, -0.008117937, -0.012961832, 0.0152542135, -0.06429504, 0.0184562, 0.058997117, -0.027178442, -0.019294549, -0.01587592, 0.0048053437, 0.043830805, 0.011232237, -0.026841154, -0.0007282251, -0.00862919, -0.008405325, 0.019370917, -0.008112641, -0.014931766, 0.065622255, 0.0149185015, 0.013089685, -0.0028022556, -0.028629888, -0.048105706, 0.009296162, 0.010251239, 0.030800395, 0.028263845, -0.011021621, -0.034127586, 0.014709971, -0.0075270324, 0.010737263, 0.020517904, -0.012932179, 0.007153817, 0.03736311, -0.03391106, 0.03028614, 0.012531187, -0.046059456, -0.0043963846, 0.028799629, -0.06663413, -0.009447025, -0.019833198, -0.036111858, -0.01901045, 0.040701825, 0.0060573653, 0.027482377, -0.019782187, -0.020186251, 0.028398912, 0.027108852, 0.026535714, -0.000995191, -0.020599326, -0.005658084, -0.017271476, 0.026300041, -0.006992451, -0.08593853, 0.03675959, 0.0029454317, -0.040927384, -0.035480253, 0.016498009, -0.03406521, -0.026182177, -0.0007024827, 0.019500641, 0.0047998386, -0.02416359, 0.0019833131, 0.0033488963, 0.037788488, -0.009154958, -0.043469638, -0.024896, -0.017234193, 0.044996973, -0.06303135, -0.051730774, 0.04041444, 0.0075959326, -0.03901764, -0.019851806, -0.008242245, 0.06107143, 0.030118924, -0.016167669, -0.028161867, -0.0025679746, -0.021713274, 0.025275888, -0.012819265, -0.036431268, 0.017991759, 0.040626206, -0.0036572467, -0.0005935883, -0.0037468506, 0.034460746, -0.0182785, -0.00431203, -0.044755403, 0.016463224, 0.041199315, -0.0093387, 0.03919184, -0.01151653, -0.016965209, 0.006347649, 0.021104146, 0.060276803, -0.026659148, 0.026461488, -0.032700688, 0.0012274865, -0.024675943, -0.003006079, -0.009607032, 0.010597691, 0.0043017124, -0.01908524, 0.006748306, -0.03049305, -0.017481703, 0.036747415, 0.036634356, 0.0007106319, 0.045647435, -0.020883067, -0.0593661, -0.03929885, 0.042825453, 0.016104022, -0.03222858, 0.031112716, 0.020407677, -0.013276762, 0.03657825, -0.033871554, 0.004176301, 0.009538976, -0.009995692, 0.0042660628, 0.050545394, -0.018142857, 0.005219403, 0.0006711967, -0.014264284, 0.031044828, -0.01827481, 0.012488852, 0.031393733, 0.050390214, -0.014484084, -0.054758117, 0.055042055, -0.005506624, -0.0066648237, 0.010891078, 0.012446279, 0.061687976, 0.018091502, 0.0026527622, 0.0321537, -0.02469515, 0.01772019, 0.006846163, -0.07471038, -0.024433741, 0.02483875, 0.0497063, 0.0043456135, 0.056550737, 0.035752796, -0.02430349, 0.036570627, -0.027576203, -0.012418993, 0.023442797, -0.03433812, 0.01953399, -0.028003592, -0.021168072, 0.019414881, -0.014712576, -0.0003938545, 0.021453558, -0.023197332, -0.004455581, -0.08799191, 0.0010808896, 0.009281116, -0.0051161298, 0.031497046, 0.034916095, -0.023042161, 0.030799815, 0.017298799, 0.0015253434, 0.013728047, 0.0035838438, 0.016767647, -0.022243451, 0.013371096, 0.053564783, -0.008776885, -0.013133307, 0.015577713, -0.027008705, 0.009490815, -0.04103532, -0.012426461, -0.0050485474, -0.04323231, -0.013291623, -0.01660157, -0.055480026, 0.017622838, 0.017476618, -0.009798125, 0.038226977, -0.03127579, 0.019329516, 0.033461004, -0.0039813113, -0.039526325, 0.03884973, -0.011381027, -0.023257744, 0.03033401, 0.0029607012, -0.0006490531, -0.0347344, 0.029701462, -0.04153701, 0.028073426, -0.025427297, 0.009756264, -0.048082624, 0.021743972, 0.057197016, 0.024082556, -0.013968224, 0.044379756, -0.029081704, 0.003487999, 0.042621125, -0.04339743, -0.027005397, -0.02944044, -0.024172144, -0.07388652, 0.05952364, 0.02561452, -0.010255158, -0.015288555, 0.045012463, 0.012403602, -0.021197597, 0.025847573, -0.016983166, 0.03021369, -0.02920852, 0.035140667, -0.010627725, -0.020431923, 0.03191218, 0.0046844087, 0.056356475, -0.00012615003, -0.0052536936, -0.058609407, 0.009710908, 0.00041168949, -0.22300485, -0.0077232462, 0.0029359192, -0.028645728, -0.021156758, 0.029606635, -0.026473567, -0.0019432966, 0.023867624, 0.021946864, -0.00082128344, 0.01897284, -0.017976845, -0.015677344, -0.0026336901, 0.030096486]
}
)
print(res)
# Output
#
# [0]
# 4. Prepare the dataset
# To insert multiple entities at a time, organize your data in a list of dictionaries.
# Each dictionary represents an entity, and the keys are the field names.
data = [
{
'id': 0,
'title': 'The Reported Mortality Rate of Coronavirus Is Not Important',
'vector': [0.041732933, 0.013779674, -0.027564144, -0.013061441, 0.009748648, 0.00082446384, -0.00071647146, 0.048612226, -0.04836573, -0.04567751, 0.018008126, 0.0063936645, -0.011913628, 0.030776596, -0.018274948, 0.019929802, 0.020547243, 0.032735646, -0.031652678, -0.033816382, -0.051087562, -0.033748355, 0.0039493158, 0.009246126, -0.060236514, -0.017136049, 0.028754413, -0.008433934, 0.011168004, -0.012391256, -0.011225835, 0.031775184, 0.002929508, -0.007448661, -0.005337719, -0.010999258, -0.01515909, -0.005130484, 0.0060212007, 0.0034560722, -0.022935811, -0.04970116, -0.0155887455, 0.06627353, -0.006052789, -0.051570725, -0.109865054, 0.033205193, 0.00041118253, 0.0029823708, 0.036160238, -0.011256539, 0.00023560718, 0.058322437, 0.022275906, 0.015206677, -0.02884609, 0.0016338055, 0.0049200393, 0.014388571, -0.0049061654, -0.04664761, -0.027454877, 0.017526226, -0.005100602, 0.018090058, 0.02700998, 0.04031944, -0.0097965, -0.03674761, -0.0043163053, -0.023320708, 0.012654851, -0.014262311, -0.008081833, -0.018334744, 0.0014025003, -0.003053399, -0.002636383, -0.022398386, -0.004725274, 0.00036367847, -0.012368711, 0.0014739085, 0.03450414, 0.009684024, 0.017912658, 0.06594397, 0.021381201, 0.029343689, -0.0069561847, 0.026152428, 0.04635037, 0.014746184, -0.002119602, 0.034359712, -0.013705124, 0.010691518, 0.04060854, 0.013679299, -0.018990282, 0.035340093, 0.007353945, -0.035990074, 0.013126987, -0.032933377, -0.001756877, -0.0049658176, -0.03380879, -0.07024137, -0.0130426735, 0.010533265, -0.023091802, -0.004645729, -0.03344451, 0.04759929, 0.025985204, -0.040710885, -0.016681142, -0.024664842, -0.025170377, 0.08839205, -0.023733815, 0.019494494, 0.0055427826, 0.045460507, 0.07066554, 0.022181382, 0.018302314, 0.026806992, -0.006066003, 0.046525814, -0.04066389, 0.019001767, 0.021242762, -0.020784091, -0.031635042, 0.04573943, 0.02515421, -0.050663553, -0.05183343, -0.046468202, -0.07910535, 0.017036669, 0.021445233, 0.04277428, -0.020235524, -0.055314954, 0.00904601, -0.01104365, 0.03069203, -0.00821997, -0.035594665, 0.024322856, -0.0068963314, 0.009003657, 0.00398102, -0.008596356, 0.014772055, 0.02740991, 0.025503553, 0.0038213644, -0.0047855405, -0.034888722, 0.030553816, -0.008325959, 0.030010607, 0.023729775, 0.016138833, -0.022967983, -0.08616877, -0.02460819, -0.008210168, -0.06444098, 0.018750126, -0.03335763, 0.022024624, 0.032374356, 0.023870794, 0.021288997, -0.026617877, 0.020435361, -0.003692393, -0.024113296, 0.044870164, -0.030451361, 0.013022849, 0.002278627, -0.027616743, -0.012087787, -0.033232547, -0.022974484, 0.02801226, -0.029057292, 0.060317725, -0.02312559, 0.015558754, 0.073630534, 0.02490823, -0.0140531305, -0.043771528, 0.040756326, 0.01667925, -0.0046050115, -0.08938058, 0.10560781, 0.015044094, 0.003613817, 0.013523503, -0.011039813, 0.06396795, 0.013428416, -0.025031878, -0.014972648, -0.015970055, 0.037022553, -0.013759925, 0.013363354, 0.0039748577, -0.0040822625, 0.018209668, -0.057496265, 0.034993384, 0.07075411, 0.023498386, 0.085871644, 0.028646072, 0.007590898, 0.07037031, -0.05005178, 0.010477505, -0.014106617, 0.013402172, 0.007472563, -0.03131418, 0.020552127, -0.031878896, -0.04170217, -0.03153583, 0.03458349, 0.03366634, 0.021306382, -0.037176874, 0.029069472, 0.014662372, 0.0024123765, -0.025403008, -0.0372993, -0.049923114, -0.014209514, -0.015524425, 0.036377322, 0.04259327, -0.029715618, 0.02657093, -0.0062432447, -0.0024253451, -0.021287171, 0.010478781, -0.029322306, -0.021203341, 0.047209084, 0.025337176, 0.018471811, -0.008709492, -0.047414266, -0.06227469, -0.05713435, 0.02141101, 0.024481304, 0.07176469, 0.0211379, -0.049316987, -0.124073654, 0.0049275495, -0.02461509, -0.02738388, 0.04825289, -0.05069646, 0.012640115, -0.0061352802, 0.034599125, 0.02799496, -0.01511028, -0.046418104, 0.011309801, 0.016673129, -0.033531003, -0.049203333, -0.027218347, -0.03528408, 0.008881575, 0.010736325, 0.034232814, 0.012807507, -0.0100207105, 0.0067757815, 0.009538357, 0.026212366, -0.036120333, -0.019764563, 0.006527411, -0.016437015, -0.009759148, -0.042246807, 0.012492151, 0.0066206953, 0.010672299, -0.44499892, -0.036189068, -0.015703931, -0.031111298, -0.020329623, 0.0047888453, 0.090396516, -0.041484866, 0.033830352, -0.0033847596, 0.06065415, 0.030880837, 0.05558494, 0.022805553, 0.009607596, 0.006682602, 0.036806617, 0.02406229, 0.034229457, -0.0105605405, 0.034754273, 0.02436426, -0.03849325, 0.021132406, -0.01251386, 0.022090863, -0.029137045, 0.0064384523, -0.03175176, -0.0070441505, 0.016025176, -0.023172623, 0.00076795724, -0.024106828, -0.045440633, -0.0074440194, 0.00035374766, 0.024374487, 0.0058897804, -0.012461025, -0.029086761, 0.0029477053, -0.022914894, -0.032369837, 0.020743662, 0.024116345, 0.0020526652, 0.0008596536, -0.000583463, 0.061080184, 0.020812698, -0.0235381, 0.08112197, 0.05689626, -0.003070104, -0.010714772, -0.004864459, 0.027089117, -0.030910335, 0.0017404438, -0.014978656, 0.0127020255, 0.01878998, -0.051732827, -0.0037475713, 0.013033434, -0.023682894, -0.03219574, 0.03736345, 0.0058930484, -0.054040316, 0.047637977, 0.012636436, -0.05820182, 0.013828813, -0.057893142, -0.012405234, 0.030266648, -0.0029184038, -0.021839319, -0.045179468, -0.013123978, -0.021320488, 0.0015718226, 0.020244086, -0.014414709, 0.009535103, -0.004497577, -0.02577227, -0.0085017495, 0.029090486, 0.009356506, 0.0055838437, 0.021151636, 0.039531752, 0.07814674, 0.043186333, -0.0077368533, 0.028967595, 0.025058193, 0.05432941, -0.04383656, -0.027070394, -0.080263995, -0.03616516, -0.026129462, -0.0033627374, 0.035040155, 0.015231506, -0.06372076, 0.046391208, 0.0049725454, 0.003783345, -0.057800908, 0.061461, -0.017880175, 0.022820404, 0.048944063, 0.04725843, -0.013392871, 0.05023065, 0.0069421427, -0.019561166, 0.012953843, 0.06227977, -0.02114757, -0.003334329, 0.023241237, -0.061053444, -0.023145229, 0.016086273, 0.0774039, 0.008069459, -0.0013532874, -0.016790181, -0.027246375, -0.03254919, 0.033754334, 0.00037142826, -0.02387325, 0.0057056695, 0.0084914565, -0.051856343, 0.029254, 0.005583839, 0.011591886, -0.033027634, -0.004170374, 0.018334484, -0.0030969654, 0.0024489106, 0.0030196267, 0.023012564, 0.020529047, 0.00010772953, 0.0017700809, 0.029260442, -0.018829526, -0.024797931, -0.039499596, 0.008108761, -0.013099816, -0.11726566, -0.005652353, -0.008117937, -0.012961832, 0.0152542135, -0.06429504, 0.0184562, 0.058997117, -0.027178442, -0.019294549, -0.01587592, 0.0048053437, 0.043830805, 0.011232237, -0.026841154, -0.0007282251, -0.00862919, -0.008405325, 0.019370917, -0.008112641, -0.014931766, 0.065622255, 0.0149185015, 0.013089685, -0.0028022556, -0.028629888, -0.048105706, 0.009296162, 0.010251239, 0.030800395, 0.028263845, -0.011021621, -0.034127586, 0.014709971, -0.0075270324, 0.010737263, 0.020517904, -0.012932179, 0.007153817, 0.03736311, -0.03391106, 0.03028614, 0.012531187, -0.046059456, -0.0043963846, 0.028799629, -0.06663413, -0.009447025, -0.019833198, -0.036111858, -0.01901045, 0.040701825, 0.0060573653, 0.027482377, -0.019782187, -0.020186251, 0.028398912, 0.027108852, 0.026535714, -0.000995191, -0.020599326, -0.005658084, -0.017271476, 0.026300041, -0.006992451, -0.08593853, 0.03675959, 0.0029454317, -0.040927384, -0.035480253, 0.016498009, -0.03406521, -0.026182177, -0.0007024827, 0.019500641, 0.0047998386, -0.02416359, 0.0019833131, 0.0033488963, 0.037788488, -0.009154958, -0.043469638, -0.024896, -0.017234193, 0.044996973, -0.06303135, -0.051730774, 0.04041444, 0.0075959326, -0.03901764, -0.019851806, -0.008242245, 0.06107143, 0.030118924, -0.016167669, -0.028161867, -0.0025679746, -0.021713274, 0.025275888, -0.012819265, -0.036431268, 0.017991759, 0.040626206, -0.0036572467, -0.0005935883, -0.0037468506, 0.034460746, -0.0182785, -0.00431203, -0.044755403, 0.016463224, 0.041199315, -0.0093387, 0.03919184, -0.01151653, -0.016965209, 0.006347649, 0.021104146, 0.060276803, -0.026659148, 0.026461488, -0.032700688, 0.0012274865, -0.024675943, -0.003006079, -0.009607032, 0.010597691, 0.0043017124, -0.01908524, 0.006748306, -0.03049305, -0.017481703, 0.036747415, 0.036634356, 0.0007106319, 0.045647435, -0.020883067, -0.0593661, -0.03929885, 0.042825453, 0.016104022, -0.03222858, 0.031112716, 0.020407677, -0.013276762, 0.03657825, -0.033871554, 0.004176301, 0.009538976, -0.009995692, 0.0042660628, 0.050545394, -0.018142857, 0.005219403, 0.0006711967, -0.014264284, 0.031044828, -0.01827481, 0.012488852, 0.031393733, 0.050390214, -0.014484084, -0.054758117, 0.055042055, -0.005506624, -0.0066648237, 0.010891078, 0.012446279, 0.061687976, 0.018091502, 0.0026527622, 0.0321537, -0.02469515, 0.01772019, 0.006846163, -0.07471038, -0.024433741, 0.02483875, 0.0497063, 0.0043456135, 0.056550737, 0.035752796, -0.02430349, 0.036570627, -0.027576203, -0.012418993, 0.023442797, -0.03433812, 0.01953399, -0.028003592, -0.021168072, 0.019414881, -0.014712576, -0.0003938545, 0.021453558, -0.023197332, -0.004455581, -0.08799191, 0.0010808896, 0.009281116, -0.0051161298, 0.031497046, 0.034916095, -0.023042161, 0.030799815, 0.017298799, 0.0015253434, 0.013728047, 0.0035838438, 0.016767647, -0.022243451, 0.013371096, 0.053564783, -0.008776885, -0.013133307, 0.015577713, -0.027008705, 0.009490815, -0.04103532, -0.012426461, -0.0050485474, -0.04323231, -0.013291623, -0.01660157, -0.055480026, 0.017622838, 0.017476618, -0.009798125, 0.038226977, -0.03127579, 0.019329516, 0.033461004, -0.0039813113, -0.039526325, 0.03884973, -0.011381027, -0.023257744, 0.03033401, 0.0029607012, -0.0006490531, -0.0347344, 0.029701462, -0.04153701, 0.028073426, -0.025427297, 0.009756264, -0.048082624, 0.021743972, 0.057197016, 0.024082556, -0.013968224, 0.044379756, -0.029081704, 0.003487999, 0.042621125, -0.04339743, -0.027005397, -0.02944044, -0.024172144, -0.07388652, 0.05952364, 0.02561452, -0.010255158, -0.015288555, 0.045012463, 0.012403602, -0.021197597, 0.025847573, -0.016983166, 0.03021369, -0.02920852, 0.035140667, -0.010627725, -0.020431923, 0.03191218, 0.0046844087, 0.056356475, -0.00012615003, -0.0052536936, -0.058609407, 0.009710908, 0.00041168949, -0.22300485, -0.0077232462, 0.0029359192, -0.028645728, -0.021156758, 0.029606635, -0.026473567, -0.0019432966, 0.023867624, 0.021946864, -0.00082128344, 0.01897284, -0.017976845, -0.015677344, -0.0026336901, 0.030096486],
'link': '<https://medium.com/swlh/the-reported-mortality-rate-of-coronavirus-is-not-important-369989c8d912>',
'reading_time': 13,
'publication': 'The Startup',
'claps': 1100,
'responses': 18,
},
{
'id': 1,
'title': 'Dashboards in Python: 3 Advanced Examples for Dash Beginners and Everyone Else',
'vector': [0.0039737443, 0.003020432, -0.0006188639, 0.03913546, -0.00089768134, 0.021238148, 0.014454661, 0.025742851, 0.0022063442, -0.051130578, -0.0010897011, 0.038453076, 0.011593861, -0.046852026, 0.0064208573, 0.010120634, -0.023668954, 0.041229635, 0.008146385, -0.023367394, -0.029139837, -0.023222756, -0.016318452, -0.076287195, 0.035851076, 0.044926822, 0.0037161126, 0.024241403, -0.024827085, -0.012770665, 0.0018561907, 0.047921725, -0.030281143, -0.031129083, -0.038785066, -0.048101038, 0.008587025, -0.0036647166, -0.013043694, -0.044786748, 0.0015023423, -0.02393749, 0.027479807, 0.03407725, -0.011031249, -0.016997544, -0.11140522, -0.0012403706, -0.0116099715, 0.010803051, -0.042221617, 0.071550176, 0.029078195, 0.02936992, -0.016870253, 0.024187507, -0.0064322287, -0.0018420032, -0.010838795, 0.005448679, 0.042049922, 0.015199081, -0.00612731, 0.04651738, -0.0004543191, 0.0018536948, -0.021741537, 0.042303678, -0.016282137, 0.031659417, 0.03347323, -0.05687932, -0.04784338, 0.047716856, -0.04012971, -0.024161791, -0.015605036, 0.01364975, 0.023177518, 0.01887649, 0.040253926, 0.021470893, 0.09768697, -0.032784328, 0.03222924, 0.03559948, -0.0028161134, 0.03687029, -0.013814558, -0.009652667, 0.021593641, -0.05943368, 0.026042875, 0.028282177, 0.007687183, 0.020226369, -0.0016281981, -0.008526736, 0.025751492, -0.003104332, -0.0061201006, 0.02595484, -0.021449475, -0.014293144, -0.029449001, 0.0020593074, -0.034804724, -0.022180008, -0.006285631, 0.013707787, -0.037423145, -0.009107584, -0.009432007, 0.010610414, -0.056727782, 0.0233536, -0.0060632285, 0.055170756, 0.015278058, -0.0074357074, 0.038479842, 0.07088861, 0.06036749, 0.015448346, 0.024050185, 0.015041763, 0.022847643, 0.018183885, 0.047313735, 0.026332416, -0.002408156, 0.04366259, 0.0057872427, -0.02127312, -0.020023786, -0.02634593, 0.028322363, 0.020426102, 0.026535949, 0.031108813, -0.03800821, -0.016794013, -0.0022405083, -0.028002623, 0.013555326, -0.020880137, -0.040561143, -0.024379047, -0.058721762, 0.009864129, -0.0060728258, 0.019879017, -0.027474888, 0.004868736, -0.01618118, 0.07627549, -0.009566949, -0.0362882, -0.0013981637, 0.00036380984, 0.025276562, 0.061608184, -0.048915602, -0.043986745, -0.0055106534, -0.03694729, 0.0018953384, 0.0063064545, 0.010227479, -0.0068412647, -0.011093203, -0.0093250135, -0.019277632, 0.026233265, 0.009567129, 0.008851426, 0.01565083, 0.02383659, 0.058387164, 0.007578936, -0.039052304, -0.020484922, 0.041768145, -0.038177934, 0.032690376, -0.0088214185, 0.040147487, 0.015718441, -0.026545178, -0.023138655, -0.055501554, -0.06176257, 0.01347796, -0.043426935, 0.09015595, -0.05628449, -0.03414897, 0.077925004, 0.039848283, 0.004569112, -0.021932716, -0.008975595, 0.032322578, 0.0011694044, -0.008094395, 0.013524566, -0.010504273, -0.008891303, -0.047701288, -0.003401436, -0.006817342, -0.0131783355, 0.013252014, -0.02291292, 0.005158376, -0.005217175, -0.009027178, 0.01674159, 0.0062977904, -0.0021274886, 0.1001569, -0.010145763, 0.00398632, 0.016642937, -0.04561657, -0.00593123, 0.068103015, 0.022859594, 0.055262484, -0.07711217, -0.013573, 0.00793467, -0.00206392, -0.055678505, -0.0027695482, -0.008978216, 0.023205645, 0.010584002, 0.036940057, 0.0055925045, -0.03128972, 0.008169264, 0.002143065, 0.0054644635, 0.007751248, -0.049370192, -0.017171964, 0.012460248, -0.039616507, -0.008905116, -0.029277697, 0.0316178, 0.007783805, -0.046197712, -0.02389374, 0.03949501, 0.012882567, -0.050312858, -0.0025155935, 0.05531826, -0.0060943947, 0.040836193, -0.0057800347, 0.0639973, 0.009591699, -0.05218372, -0.03645041, -0.05206777, 0.053644467, 0.071591765, 0.008294372, 0.0028174156, 0.0048404625, 0.013453085, 0.022866488, -0.06087804, 0.023474297, 0.027761765, -0.040729735, -0.009113696, 0.020109607, 0.010756393, 0.066961266, -0.03530044, -0.0013631586, -0.034647003, 0.03281657, -0.055955954, -0.043759737, -0.014830927, -0.0012740378, 0.053068876, 0.0041171, -0.009249764, 0.04119711, -0.0022221678, 0.008220726, 0.011716879, 0.04751782, -0.021161754, -0.0034890848, 0.017168297, 0.018082855, -0.054346565, 0.01130623, -0.014759945, -0.020925378, -0.011718521, -0.5058962, -0.016079627, -0.05195381, -0.065540574, -0.024114326, 0.0045832954, 0.05303542, -0.040304415, -0.001513657, 0.019103762, 0.008554532, 0.053032935, -0.00915671, -0.009092158, -0.009177251, 0.028371146, 0.028055405, -0.008145964, 0.011927662, 0.027140373, -0.04623, -0.026633251, -0.00019752477, 0.045192443, 0.02449006, 0.013997616, -0.06873905, 0.027910134, 0.003347047, 0.0013439717, 0.034202795, -0.015585498, -0.055015743, 0.00016024683, -0.015891591, -0.021741774, 0.025558911, 0.011084363, 0.014056266, -0.018982887, 0.0016998561, 0.048058353, 0.007829392, 0.0018672302, 0.041273497, -0.039120134, 0.0003624535, -0.0011298673, -0.006326307, 0.032140832, -0.037109844, -0.00041404666, -0.0084530655, 0.0077904286, 0.012144728, -0.03869803, 0.047453202, 0.04121898, -0.032067478, 0.022875102, 0.07410041, -0.024542922, -0.036993448, -0.039777547, 0.0094557, -0.025156112, -0.035101883, -0.048749104, -0.0045563756, -0.006167684, -0.048193872, 0.0017396678, 0.019029584, -0.061944872, 0.050563816, -0.021848006, 0.008817201, 0.010323988, 0.020705162, 0.018577144, -0.048376583, -0.041189134, -0.0047300197, -0.00836772, -0.0052992413, -0.035920832, -0.029942693, 0.028925791, 0.030509083, 0.00738733, 0.124217756, -0.04977689, 0.023752924, 0.027065763, 0.057005685, 0.03732509, 0.069008276, -0.022444589, 0.0035944746, -0.041807327, 0.028195074, -0.011788701, -0.0034672262, -0.014074685, -0.009594197, 0.0018883395, -0.024706602, 0.015436245, 0.054175258, -0.03945695, -0.029252004, -0.006543419, -0.064558335, 0.00635337, 0.014417143, 0.013945442, -0.009091861, 0.0005249867, 0.010337455, -0.009454559, -0.035721924, -0.022774082, -0.031336624, 0.0416093, -0.038794383, -0.008280955, 0.033273164, 0.013371025, -0.0129316645, -0.012368203, 0.022565264, -0.0012145197, 0.01841233, -0.002506566, 0.02414115, -0.047187645, -0.0046407585, 0.032652196, 0.053410284, -0.0365266, -0.0063986774, 0.023949109, 0.010821287, 0.013743939, 0.04780526, 0.008855356, -0.028712442, 0.010830425, -0.0039607813, 0.022576412, -0.009031381, -0.04623192, 0.0140510835, 0.009459673, -0.0033195931, 0.02447672, 0.025940116, 0.015182389, -0.03030254, -0.042433836, 0.043204527, -0.009033531, -0.09083154, -0.00031694994, 0.030156016, -0.030984623, -0.031595454, 0.002228252, -0.003698093, -0.006667667, 0.023925511, -0.045642223, -0.0054936595, -0.020487037, -0.011321221, -0.008023139, -0.0022487226, 0.016701572, -0.004573161, -0.0076336027, -0.007048531, -0.03015078, 0.03309948, 0.028124114, 0.014135684, 0.009500284, -0.0033359944, 0.017857917, 0.034960285, 0.005099243, 0.021408139, -0.0065242476, 0.03559723, 0.002711937, -0.028567772, -0.044500142, 0.025019938, 0.020869007, -0.023909464, -0.06710058, -0.04702157, -0.012781483, -0.03416069, 0.009026116, 0.016877936, -0.015858926, 0.0432861, 0.029753765, -0.016831696, -0.04155155, -0.056399744, -0.0632834, -0.030745849, -0.023681961, -0.02031578, -0.006460313, 0.009156013, -0.03944369, -0.05559119, 0.011855634, 0.0043062386, -0.026944742, -0.05057878, -0.033390008, 0.0012567446, 0.00859911, 0.031703074, -0.024424741, 0.011032831, -0.03794956, -0.0058376114, 0.050361525, 0.02664676, 0.035737876, 9.327007e-05, -0.0036208995, -0.07552407, 0.008858675, 0.06525408, -0.03309569, -0.019470563, 0.029411364, -0.023945473, -0.02741788, 0.025530888, -0.004085135, -0.023078475, -0.05026493, -0.047704235, 0.0063968995, 0.05705471, -0.039139755, -0.016409663, -0.050894372, 0.0229268, 0.024625905, -0.020794865, -0.018509613, -0.0286961, 0.02955773, -0.012118265, 0.007289678, -0.017907536, -9.589148e-05, -0.014387568, 0.01077215, -0.0057492387, -0.070152126, 0.011277187, -0.06932382, 0.0064085126, -0.002137664, 0.020172758, 0.018431762, 0.02997658, -0.035457257, -0.027747527, 0.023011072, 0.0044074785, 0.022357704, -0.011456843, -0.014637661, 0.028279554, -0.018716238, 0.03532025, 0.003035383, 0.028103184, -0.026085945, -0.012884989, 0.024874324, 0.0021957066, 0.038837254, -0.013919544, 0.021001196, -0.006413539, 0.03233318, 0.054959916, 0.002057221, -0.008223584, 0.02089053, 0.031112751, 0.06568271, 0.07437756, -0.032314405, 0.0063390816, 0.021723315, 0.009370877, -0.019755581, -0.009407542, 0.008717818, -0.012684821, -0.015996328, 0.019934947, 0.05044348, -0.03040645, -0.0076975147, 0.013472682, -0.04469578, 0.059487574, 0.0077290037, -0.0062347664, 0.017982362, 0.047718633, -0.029480672, -0.049545363, 0.019446652, -0.012957434, 0.021308606, 0.0034625032, 0.016427478, 0.062390056, 0.074961245, -0.0017664412, -0.0374053, 0.006156502, -0.023779914, 0.022087418, -0.0018362328, 0.036417086, -0.031101517, 0.03615886, 0.0011009142, -0.009626947, 0.0020367356, -0.024929306, 0.05029518, 0.01021691, 0.02706921, -0.055606462, 0.050653223, -0.020299971, 0.022907283, -0.0078015765, 0.0013674265, -0.016805433, -0.005469926, -0.010843944, 0.024753453, 0.0036051865, 0.021984477, 0.019608894, 0.056622125, 0.0168941, 5.6558e-05, -0.037705585, 0.010488043, 0.055042468, -0.012437194, 0.017340036, 0.008242167, -0.032131612, 0.046392333, -0.050994188, 0.013369047, -0.031277575, -0.057127792, 0.026656566, 0.012472042, 0.03171042, 0.0155100925, -0.014371186, -0.0074701216, -0.03548123, -0.019203192, 0.020641252, 0.037671227, -0.050689723, 0.012942378, -0.010964106, -0.009750868, -0.032187466, -0.030583298, 0.031428117, -0.030721085, -0.009199497, -0.025520792, -0.016073162, 0.03206433, 0.035993624, 0.005494608, -0.02187293, 0.026701238, -0.013911904, -0.0024700807, -0.013015862, 0.041535176, -0.032522723, 0.0139125, -0.043542273, -0.02516857, 0.0098249065, 0.018275063, 0.0026843066, 0.009207035, -0.0024260108, 0.014267937, 0.04338487, -0.006479658, 0.026931532, -0.013153546, -0.032537226, -0.012409599, 0.03284542, -0.014427827, 0.00090851216, 0.034384534, 0.0022898254, 0.013645849, -0.0264273, 0.04843669, -0.037393637, -0.026378367, -0.03421471, 0.023813134, -0.037445217, -0.018552892, 0.006716699, 0.033491645, 0.046465095, -0.024037533, -0.027822671, 0.017161718, -0.0103931315, 0.043290958, -0.04675785, 0.045929935, -0.07786675, -0.033439267, -0.07128675, 0.009419761, -0.0013642106, -0.022022273, -0.019086521, -0.0038238734, -0.0007658402, -0.0077877254, 0.035752963, -0.031361237, -0.0020773965, 0.021713957],
'link': "https://medium.com/swlh/dashboards-in-python-3-advanced-examples-for-dash-beginners-and-everyone-else-b1daf4e2ec0a",
'reading_time': 14,
'publication': 'The Startup',
'claps': 726,
'responses': 3
},
{
'id': 2,
'title': 'How Can We Best Switch in Python?',
'vector': [0.031961977, 0.00047043373, -0.018263113, 0.027324716, -0.0054595284, -0.014779159, 0.017511465, 0.030381083, -0.018930407, -0.03372473, -0.009049301, 0.05401713, -0.030117748, -0.05029242, -0.004565209, -0.013697411, 0.0091306195, 0.020263411, 0.022377398, -0.013710004, 0.00041742, 0.0196022, -0.03045922, -0.009036885, 0.015411235, -0.010344614, 0.025562054, 0.017688023, -0.030953526, -0.016898274, 0.026576879, 0.027959209, -0.003575494, -0.021995515, -0.013143332, -0.008411754, 0.015792666, -0.007804189, 0.011127249, -0.018469824, 0.000866601, -0.0047294814, 0.023057077, 0.024769971, 0.006347016, -0.0053651906, -0.10139431, 0.009744879, -0.004652395, 0.004365174, -0.055456053, 0.03606845, -0.00094139896, 0.01640304, -0.01252126, 0.007557613, -0.021284489, -0.007097941, -0.02953809, 0.012779461, 0.01165686, 0.017842839, -0.051064152, 0.02416306, 0.0010631426, 0.04505233, -0.010680273, 0.03516956, -0.032654032, 0.0048729796, 0.04184754, -0.022647992, -0.05048803, 0.017783897, -0.006307326, -0.0036616833, -0.03680091, -0.002489206, 0.010861639, 0.01722319, -0.0085470015, 0.052702323, 0.045617685, -0.03452536, 0.07228468, -0.0032563882, 0.0072233807, 0.039652966, 0.013009299, -0.00073530525, -0.029937685, -0.015898889, 0.017194541, 0.041268878, 0.03691164, 0.0021090403, -0.0044218805, -0.0003518283, 0.03208571, 0.03872059, -0.015585088, -0.031691972, -0.027204208, -0.027799087, -0.03140582, -0.024144609, -0.029131236, -0.0006166679, -0.010534395, -0.053412274, -0.026039477, 0.02327985, 0.002468529, -0.015971841, -0.03870977, 0.0015068256, 0.029168412, 0.025979232, -0.00014848322, 0.023480166, 0.022882162, 0.1086864, 0.04039409, 0.04686041, 0.030854652, 0.0011865695, 0.023846114, 0.03404549, 0.027745683, -0.011852315, 0.02592257, 0.09672646, 0.04493555, -0.027386012, -0.015208758, -0.02407686, 0.004940932, 0.03843349, 0.009353459, -9.5053925e-05, -0.034731977, 0.011731949, -0.082125075, 0.034289576, 0.046927046, 0.036367156, -0.020566383, -0.011743045, 0.005362335, 0.014873384, -0.041561183, 0.027565314, -0.047460195, 0.028267229, -0.02931979, 0.043748844, -0.008986446, -0.036197904, -0.0039762477, 0.00384613, 0.026702058, -0.013507277, -0.018546203, -0.038978007, 0.008370236, -0.059048153, -0.0088269655, 0.030615881, 0.061521176, 0.040141247, -0.042904384, -0.0017646506, -0.012129865, -0.025165217, -0.007414848, -0.03211762, 0.016645478, -0.003678877, 0.02817977, 0.033541426, -0.030827818, 0.014391739, -0.016986696, -0.009304953, 0.010068301, 0.0012533539, 0.054744214, -0.03355412, -0.0126412, 0.006665331, -0.051595133, -0.026037361, 0.024609802, -0.03966661, 0.08104592, -0.011226513, -0.04584874, 0.055855907, 0.024856847, 0.04370813, 0.00019327056, -0.0014419332, 0.02126272, -0.015198758, -0.028715013, 0.1175778, 0.0018902348, 0.00060474704, -0.018893233, 0.014306088, -0.0014934064, 0.01141921, 0.0011305047, -0.04216744, -0.022631632, 0.021396926, -0.0014329525, -0.019445604, 0.013686111, 0.01649869, 0.06171409, -0.021276126, 0.0263158, 0.03875992, -0.028981235, 0.05266261, 0.054521, 0.037886284, 0.044632472, -0.05402573, -0.05315056, -0.010329648, 0.0055773426, -0.0045997864, -0.025924252, -0.0019360946, -0.0008645076, -0.03587916, 0.0061763, 0.036449447, 0.01495319, 0.012858187, -0.007967018, 0.039387755, -0.013221118, 0.0036750333, -0.01904389, -0.00033562203, 0.011822021, -0.007844666, 0.010633819, 0.031686552, 0.013216273, -0.06986176, -0.0050058817, 0.03312041, -0.008020069, -0.007771589, -0.01182697, 0.042453192, -0.03915573, 0.020194814, -0.00954806, 0.014636779, -0.0020046192, -0.023423301, -0.030332584, -0.0628702, 0.0472391, 0.012135565, 0.026438866, -0.01713713, -0.023381876, -0.13993254, 0.029665118, -0.036457572, 0.011218912, 0.038330603, -0.056250863, -0.03564765, -0.023168502, 0.06854669, 0.01736419, -0.005506834, -0.023775242, 0.0006358431, 0.008166359, -0.044492476, -0.02230922, -0.029222934, 0.006484247, -0.00048863835, -0.037827164, -0.026856521, 0.03414912, 0.006874869, -0.012198071, 0.00081886543, 0.00741021, -0.010242518, -0.0132256355, 0.015110306, 0.0155827785, 0.0049608652, 0.011982397, -0.0037450858, -0.040991265, 0.006001457, -0.48184368, -0.014675001, -0.019399617, -0.00050807477, -0.020829525, 0.010311649, 0.0091862045, -0.048885785, 0.035956666, 0.013535662, -0.018462244, 0.050372835, -0.02836579, 0.033545148, -0.0005632335, 0.007023988, 0.044697817, -0.002525599, 0.025722712, 0.019185606, -0.031526912, 0.031805854, 0.03019657, 0.011702875, 0.0072402623, 0.034088686, -0.055395007, 0.0133933285, 0.010695204, -0.022150824, -0.009092343, -0.020708743, 0.014677717, -0.02691326, -0.041022483, -0.010728332, 0.05170642, 0.009286708, 0.010499943, 0.010623252, -0.007898877, 0.026833422, 0.020545354, 0.0045525357, 0.026015494, 0.0013438065, -0.008843245, -0.03299382, 0.0036264951, 0.0631423, -0.043489218, -0.0067020636, 0.08263549, 0.02432318, -0.0018398056, -0.035592306, 0.037945632, 0.02471174, 0.018099476, 0.008289202, 0.057471566, -0.034602158, -0.0030834016, -0.077851646, 0.000621722, -0.010408296, -0.01503258, -0.021677738, 0.035202455, 0.02111145, -0.059643175, -0.008791222, -0.0049411054, -0.06235482, 0.05213403, -7.3968346e-05, -0.042797476, 0.025670705, 0.031570684, 0.005316893, -0.036642972, -0.045712292, -0.031201003, 0.0013435282, -0.000494309, -0.03169252, -0.020528838, 0.01809954, -0.019055236, 0.03645839, 0.06659739, -0.030998535, -0.011546504, 0.045022737, 0.04093621, 0.0534356, 0.060189668, -0.068081446, -0.0048630824, -0.022713043, 0.028602442, -0.043265317, -0.04292418, -0.021301687, -0.012547421, 0.0079896515, -0.016087562, 0.036705207, 0.037259102, -0.02395996, -0.042752225, 0.014155132, -0.025802076, -0.012854622, 0.027047012, 0.033388477, -0.0072962856, -0.030946407, 0.010230067, -0.031012211, -0.018188275, 0.029999569, 0.012055036, 0.020398764, -0.013843629, -0.039526306, 0.020703869, -0.0037418825, -0.0052683037, -0.017438497, -0.02282057, 0.0012672462, 0.0018585115, -0.012557607, -0.010483216, -0.019720279, 0.019221477, 0.04736351, 0.005414666, -0.057573926, -0.0071921526, -0.0001097653, -0.027598547, 0.027446415, -0.008795139, 0.001392441, 0.0012335415, -0.008592807, -0.0432095, 0.021367712, -0.014368737, -0.048905294, 0.03449548, 0.014495232, -0.012759583, 0.002067632, 0.025151605, 0.023311006, 0.053315796, -0.018494522, 0.026421981, -0.0087005105, -0.096432306, -0.0025691572, 0.035672404, -0.05256038, -0.0069832117, -0.01132947, -0.019128852, 0.047870636, -0.017571028, -0.00736777, -0.02712124, 0.0124487365, 0.030766713, -0.0071845357, 0.013875514, -0.0061107697, -0.0118085835, -0.0043757795, 0.035335075, -0.031514447, 0.008930741, 0.060583394, 0.009514371, -0.06121421, -0.0059463717, -0.014056502, -0.00457576, -0.018932668, -0.0047621797, 0.014372747, 0.05434973, -0.0069508883, -0.018155267, -0.01424335, 0.01727908, 0.015375504, -0.0043006744, -0.039005376, 0.0011630051, 0.030958423, -0.0024497176, 0.026296826, 0.032621946, -0.043037336, -0.0062458026, -0.0024066344, -0.025261067, -0.012876287, 0.004674665, -0.062701315, -0.036242086, -0.015491459, -0.033093378, -0.003791472, 0.003521233, 0.015312638, -0.018087002, 0.0007275054, -0.025592119, -0.033027202, 0.0040619876, -0.0049337046, 0.012276444, 0.028485294, -0.0022711728, -0.037957348, 0.026373198, 0.011347564, 0.02729493, -0.012358346, 0.0038525765, 0.045374937, -0.021545382, -0.015508571, -0.011422388, 0.030073423, -0.035008345, -0.045318596, 0.030025236, 0.027738895, -0.010382076, 0.0018489916, -0.051705457, -0.00014905288, -0.01871698, -0.026817072, -0.065421715, -0.009121612, 0.020758322, -0.01539622, -0.0025403304, -0.058611013, 0.03054597, 0.021318326, 0.0027275842, -0.020702, -0.004794398, 0.019018736, -0.012444672, -0.019887973, -0.022113265, 0.023049643, -0.014587576, 0.014351464, 0.029817551, -0.0609792, 0.042052478, -0.055451162, -0.034356594, -0.047547698, -0.01826999, 0.040954057, 0.002969797, -0.056506813, -0.0073451693, -0.02482, 0.03168265, 0.015525525, 0.07468302, 0.01469982, 0.00210511, -0.019698266, -0.00031182918, -0.019210724, 0.041207567, 0.0053758505, 0.009472572, 0.03771915, -0.06461313, 0.04082511, -0.008058872, 0.0012331214, 0.0069069173, 0.0024821213, 0.006390242, 0.0011468151, -0.038794484, -0.063377164, -0.014241851, 0.04237302, 0.06795088, -0.023934761, -0.020242302, 0.02311365, -0.012824183, 0.03533031, -0.008410466, 0.02789391, -0.013549344, 0.022365555, 0.025989164, 0.04313728, -0.028337618, 0.026092393, 0.024711346, -0.052706428, 0.005730622, 0.022862181, -0.0076183174, -0.037243042, 0.052232295, -0.016049191, -0.06881278, 0.031964153, -0.021035925, 0.0138404025, -0.0013810501, 0.016167158, 0.034111433, 0.07161581, -0.025092546, -0.04386276, -0.0040376517, -0.025154384, 0.03385207, 0.015494304, 0.0048881858, 0.016264858, 0.061570168, 0.029936614, -0.01829368, -0.0037140124, -0.02359431, 0.023544896, 0.020937245, -0.0061871763, -0.045603115, 0.053354852, 0.040365223, 0.01763893, -0.020082904, 0.0067172833, 0.008561443, 0.00088409515, 0.0058731064, -0.016091827, 0.021013025, -0.080045305, 0.051248446, 0.051069897, -0.020342922, 0.003785443, -0.023021897, 0.018125402, 0.053128835, 0.007378299, 0.0270741, 0.02051721, -0.038264796, 0.027366923, -0.021771278, 0.027172359, -0.01405901, -0.025535831, -0.026873125, 0.025676413, -0.034890138, 0.009825487, -0.000653567, -0.0041931183, -0.03914068, -0.012084683, 0.021727156, 0.026943136, -0.024454104, 0.014687368, -0.036083054, 0.0052459547, -0.033593263, -0.037296012, -0.00528183, 0.024822053, -0.032910015, 0.013125118, -0.019655148, 0.050365735, 0.0025480876, 0.011558444, 0.02348081, 0.0059274384, 0.021103512, 0.025836773, -0.011869778, 0.024600193, -0.0393065, -0.018619377, -0.03744179, -0.026498258, 0.027013863, 0.039253354, -0.008169781, -0.009831139, -0.002388968, 0.04232686, 0.010924937, -0.034946863, 0.0039843144, 0.014260961, -0.06428069, -0.03166362, 0.024884656, 0.027559036, 0.0057664, 0.007130555, 0.029336175, 0.016878324, -0.02320544, 0.021938594, 0.008355895, -0.007115111, -0.023438789, 0.03528865, -0.009152654, -0.008653632, 0.0082724, -0.0025690612, 0.03129816, -0.007876752, -0.017509712, 0.024677664, 0.0370758, 0.021148562, -0.27696472, 0.0028338798, -0.014097512, -0.019267568, -0.03345135, 0.006941969, 0.010284976, 0.0012813237, -0.007259589, 0.006475924, 0.012507553, 0.033468552, 0.025855746, -0.03161831, 0.0067092087, 0.034458436],
'link': 'https://medium.com/swlh/how-can-we-best-switch-in-python-458fb33f7835',
'reading_time': 6,
'publication': 'The Startup',
'claps': 500,
'responses': 7
},
]
# The following snippet reads the first 200 rows from the dataset and form them in the above format.
with open(DATASET_PATH) as f:
data = json.load(f)
data = data["rows"][:200]
for x in data:
x["vector"] = x.pop("title_vector")
print(data[:2])
# Output
#
# [
# {
# "id": 0,
# "title": "The Reported Mortality Rate of Coronavirus Is Not Important",
# "link": "https://medium.com/swlh/the-reported-mortality-rate-of-coronavirus-is-not-important-369989c8d912",
# "reading_time": 13,
# "publication": "The Startup",
# "claps": 1100,
# "responses": 18,
# "vector": [
# 0.041732933,
# 0.013779674,
# -0.027564144,
# -0.013061441,
# 0.009748648,
# 0.00082446384,
# -0.00071647146,
# 0.048612226,
# -0.04836573,
# -0.04567751,
# "(758 more items hidden)"
# ]
# },
# {
# "id": 1,
# "title": "Dashboards in Python: 3 Advanced Examples for Dash Beginners and Everyone Else",
# "link": "https://medium.com/swlh/dashboards-in-python-3-advanced-examples-for-dash-beginners-and-everyone-else-b1daf4e2ec0a",
# "reading_time": 14,
# "publication": "The Startup",
# "claps": 726,
# "responses": 3,
# "vector": [
# 0.0039737443,
# 0.003020432,
# -0.0006188639,
# 0.03913546,
# -0.00089768134,
# 0.021238148,
# 0.014454661,
# 0.025742851,
# 0.0022063442,
# -0.051130578,
# "(758 more items hidden)"
# ]
# }
# ]
# Empty the collection
client.delete(collection_name=COLLECTION_NAME, pks=0)
# Insert multiple entities
res = client.insert(
collection_name=COLLECTION_NAME,
data=data
)
print(res)
# Output
#
# [
# 0,
# 1,
# 2,
# 3,
# 4,
# 5,
# 6,
# 7,
# 8,
# 9,
# "(190 more items hidden)"
# ]
time.sleep(10)
# 5. Conduct a single vector search
# Organize your query vector in a list of list of floats.
SEARCH_VECTORS_1 = [
[0.067084685, 0.012763148, -0.019562697, 0.041436773, -0.0071800495, 0.0068031778, 0.026846228, 0.0018171414, -0.017885696, -5.144758e-06, 0.021773607, 0.03877538, -0.04305705, 0.0040129432, -0.026112838, 0.02804271, 0.039550524, 0.009657041, 0.006124304, -0.03587743, -0.047360566, 0.047994304, -0.0026333537, -0.009287217, -0.009531011, -0.011128416, -0.0008089687, -0.012472947, -0.029548844, 0.018742273, -0.010443951, 0.03686704, -0.0062725404, -0.033065494, -0.037441205, -0.021756195, 0.015326248, -0.021178713, 0.004664664, -0.058233317, 0.00014567704, -0.004691694, -0.020430796, 0.018015612, -0.025032096, -0.0017203568, -0.15430935, -0.021535715, -0.023457527, 0.0091514895, 0.010723129, 0.029708661, 0.013871869, 0.033172037, -0.0039122645, 0.042791307, 0.0011374152, 0.008869271, 0.0029381646, -0.03368228, -0.0060222964, 0.0043577226, -0.013947957, 0.009290493, -0.012540634, 0.00273017, 0.022820204, 0.026924528, -0.022086479, -0.060783494, 0.016817782, -0.048939366, 0.019599559, 0.006206328, -0.002290718, -0.03590918, -0.018897992, -0.0042805285, 0.011843795, -0.017050676, -0.013486483, 0.020436956, 0.007546162, -0.02693981, 0.030861974, -0.013079769, -0.0062708417, 0.05667484, -0.011895964, -0.019626874, 0.019658655, -0.01592551, 0.048192456, 0.025277842, 0.012791405, -0.01912894, 0.018978393, -0.014250473, 0.01703835, 0.03480962, 0.0063537387, -0.042249113, -0.00043459053, -0.0018622469, -0.009442041, 0.017618423, 0.031027863, -0.022231897, -0.0376824, -0.04357785, -0.03438631, 0.029176407, -0.029065061, 0.017853128, -0.03679002, -0.01343899, 0.010235031, -0.0064424444, -0.013969234, -0.02093429, 0.03242403, 0.081176125, 0.047020823, -0.0053490726, 0.026101233, -0.011347566, 0.007888563, 0.033007886, -0.0329995, 0.020665517, 0.04136607, 0.035906706, -0.03490551, -0.0053841537, -0.011719225, -0.051888738, 0.013233477, 0.024516504, 0.022379812, -0.019201498, -0.06641265, 0.009281021, -0.117206626, 0.01930055, 0.013030688, -0.020969143, -0.009417929, 0.006143121, 0.011270797, -0.00027001393, 0.010003906, 0.01708631, -0.016258342, 0.024448106, 0.016732391, 0.037978027, -0.016748767, -0.05220301, -0.001617842, 0.009138166, 0.012382751, -0.015260991, 0.0054500694, -0.028620195, 0.008110576, -0.033788614, 0.0039199656, 0.020877296, -0.0019069016, 0.02486228, -0.054951686, 0.016345063, 0.0031373682, -0.018256962, -0.032652415, -0.0015583407, 0.035434894, 0.0057147266, 0.017852651, 0.019489108, -0.059383944, 0.047080282, 0.013476704, -0.034344416, -0.021401603, -0.0047124117, 0.03282476, 0.0310293, 0.0059062857, 0.017943364, -0.025785094, -0.008369121, 0.043759152, -0.05713893, 0.080261536, -0.019094586, -0.030248133, 0.031530432, -0.0078049167, -0.0072037927, 0.0037481654, -0.0052728076, 0.00545658, -0.03494784, -0.040497135, 0.12920712, 0.03730018, 0.013103399, -0.02073502, 0.023221344, 0.021372316, -0.020007843, -0.02039844, -0.034015827, -0.024792869, 0.02398402, -1.8960509e-05, 0.042674873, 0.023521705, -0.020507248, 0.049451265, -0.008896, 0.017111603, 0.04130102, 0.0117504895, 0.043999847, 0.013219506, 0.035527136, 0.01432157, -0.07690921, 0.0035484403, 0.0522345, 0.004887539, -0.04470897, 0.014145424, -0.002322764, -0.0006711694, -0.005171149, 0.009290426, -0.018422173, -0.016586823, 0.0136319, 0.001188213, 0.057175174, -0.017342528, 0.027671505, -0.042186387, 0.011572681, -0.021391649, -0.0033423735, -0.037542935, 0.005212495, -0.024934493, -0.032270443, 0.010533489, 0.016265279, -0.012949663, -0.0015713088, -0.0036994736, 0.028886143, -0.033987533, -0.014176839, -0.041233867, -0.0067877164, 0.021908464, -0.005136184, -0.04080503, -0.069470644, 0.021477029, 0.0458543, 0.023247648, 0.030698316, -0.039564475, -0.088643864, -0.02261754, 0.0045118416, 0.024566436, 0.046393085, -0.02216351, 0.00024930306, -0.021449536, 0.048293836, 0.014707752, 0.009909892, 0.019592311, -0.03260006, 0.050508883, 0.0155325895, -0.02318899, -0.009280294, -0.00054715853, 0.035641793, -0.03841018, -0.054086722, 0.042260613, -0.020135589, -0.009209342, -0.016331578, 0.013113423, 0.0073161772, -0.022116443, 0.0022690226, -0.013815287, -0.014608138, 0.011891289, -0.03987457, -0.024125988, -0.008877569, -0.542385, -0.0046418267, -0.014450025, 0.01846464, -0.0061272443, -0.03645763, 0.014598165, 0.0012847413, -0.013254723, -0.041983943, -0.0054658838, 0.048491694, 0.0032385683, 0.040096495, 0.013880233, 0.03769998, 0.057995755, 0.018937912, 0.04356247, 0.029422382, -0.005512912, -0.008185129, 0.03007349, 0.04359526, 0.025219219, 0.052304782, -0.056456745, 0.024315445, -0.01517588, 0.008818714, -0.042450584, -0.007820796, 0.000957012, -0.004087399, -0.0027900063, -0.00019836269, 0.03993002, -0.022075728, -0.009659706, 0.0008730084, 0.0012557252, 0.041804712, -0.008591671, 0.02663977, 0.014103868, -0.01176633, 0.01425333, -0.030660864, -0.012643644, 0.012647466, 0.003992557, -0.013068864, 0.054271225, 0.02956457, -0.0015290714, -0.04789449, 0.016195755, -0.004720862, -0.025444793, 0.040675398, 0.017635116, -0.007445805, -0.012083248, -0.006593255, -0.03685501, 0.018322079, -0.003794312, -0.038512487, 0.068935715, -0.0013345716, -0.028566675, 0.03148971, 0.045071516, -0.04984122, 0.020047592, 0.036119983, -0.024444863, 0.03837795, 0.036707856, 0.03046198, -0.08290884, -0.038781814, 0.0078084655, -0.044541225, 0.033088982, -0.05095062, -0.02788698, 0.028235609, 0.0011700212, 0.055747226, 0.049074765, -0.003699976, 0.018218154, 0.036603563, 0.03944698, 0.12145004, 0.044003617, -0.030536028, 0.013713464, -0.03582614, 0.0341466, -0.011713959, 0.028322138, -0.016736003, -0.021829609, -0.023059523, -0.0518097, 0.04348778, 0.025956193, -0.020402918, 0.022030508, 0.026951065, -0.03857684, 0.009612844, 0.04294417, -0.003245114, -0.018945828, 0.030980175, 0.030147055, -0.036157973, 0.014093662, 0.024588404, 0.008243173, -0.021246169, -0.017501911, 0.008693468, -0.0032473255, -0.001274957, 0.03229837, 0.049598627, -0.0022973216, 0.0033379667, -0.0066531445, -0.040082663, -0.025768949, -0.018924223, -0.013402923, 0.02877348, -0.03348661, -0.04335803, 0.030348256, 0.0030123033, -0.018637355, 0.031215603, 0.009703184, -0.012250483, -0.017783208, -0.0012993875, 0.03494102, 0.022051882, -0.0037361863, 0.0144340005, 0.0007772601, -0.022412954, 0.016905298, 0.0051659457, 0.019687157, -0.036714446, 0.011084603, 0.032493114, 0.04167994, 0.0052087703, -0.1340144, 0.020904416, 0.03880898, -0.004997134, -0.03379452, -0.0027288045, 0.0017003448, 0.045896202, -0.0251439, -0.04012667, 0.008189411, 0.009342803, -0.008737683, -0.016964946, -0.013769445, -0.0039055822, 9.105085e-05, -0.0014306931, -0.01370459, -0.03021115, -0.03371149, 0.019536795, 0.034956485, -0.035423536, -0.0001793012, 0.031117702, -0.03684463, -0.03441676, -0.0032415327, 0.023432557, 0.04477826, 0.021365063, -0.016579695, -0.041772667, -0.007235941, 0.051481932, 0.020723345, 0.0027636953, -0.01670209, 0.010251357, -0.005765525, -0.008929097, 0.030185755, -0.047766156, 0.045013517, 0.007230817, -0.0021736303, 0.016125442, -0.030083746, -0.060406208, -0.04190568, 0.024696488, -0.01143736, -0.032770127, 0.005331429, -0.01818162, -0.03302437, 0.004453679, 0.07522827, -0.0026776046, -0.04824753, -0.003460575, -0.018161483, 0.0011453037, 0.0049157077, -0.07813969, 0.018300964, -0.0051002055, 0.02079756, 0.0035663457, -0.007433807, 0.04271708, -0.009733036, -0.0118808625, 0.013809495, 0.059501708, -0.021575449, -0.05935755, -0.0035455024, -0.02693452, -0.017190132, -0.016059617, -0.014253175, 0.049172483, 0.021585494, -0.019737553, -0.042685244, -0.0142481, 0.0101315025, 0.017116902, -0.026357282, -0.04408546, 0.040629655, -0.0049285134, -0.01832608, -0.03478675, -0.0026891741, 0.011267896, -0.013378763, 0.00038937217, -0.033136602, -0.019912021, 0.0005154215, -0.014184948, -0.0039172196, -0.034798123, 0.020901538, -0.031190442, -0.0188423, 0.00089758966, -0.031973753, 0.041402347, -0.024570376, 0.009384613, -0.015127522, -0.0066246563, 0.0053242114, 0.018116094, 0.03593241, 0.0138109075, 0.0054535866, -0.006286201, -0.016241968, -0.014714209, 0.044731583, 0.0049299267, 0.018034935, -0.021785134, 0.0039582113, 0.007881306, 0.0025793097, -0.042218346, 0.009456891, 0.036283787, 0.0146247605, -0.0098402975, 0.0037902303, -0.03996696, -0.024825035, -0.002218162, 0.02680719, -0.06429411, 0.0041645677, 0.036587194, 0.016344147, -0.011895876, -0.0047728666, -0.012840077, 0.024035104, -0.004805998, 0.013976597, 0.04548439, -0.0342657, -0.013345326, 0.035000067, -0.045974903, -0.0014153081, 0.025639469, 0.015180726, -0.025232967, 0.062155142, -0.0074546896, -0.026970528, 0.024351746, 0.009845394, -0.0030415193, 0.018005231, 0.028550927, 0.058446534, 0.052299928, -0.005342624, -0.017217442, -0.00256019, -0.042966325, 0.05070154, -0.001058939, -0.00032248945, -0.0008024313, 0.03253681, -0.0052430714, 0.004956301, -0.002408752, -0.0053530117, 0.021631103, 0.05547592, -0.009938055, -0.034457657, 0.027521914, 0.01240609, 0.0119028855, 0.0024289973, -0.025401114, 0.0033537287, -0.046087854, 0.0025625397, 0.02055915, -0.03852718, -0.08814635, 0.017578295, 0.007510919, -0.03178676, 0.018278323, 0.04088973, 0.01573187, 0.030416224, 0.024065565, -0.01635669, 0.011522964, -0.019805027, -0.021166855, 0.02497459, 0.01471735, -0.02437242, -0.035158277, 0.0053584804, 0.00015995267, 0.015659729, -0.01616051, -0.0059671486, -0.0074259965, -0.037194114, 0.01918367, 0.018669305, 0.00238937, -0.013435635, 0.007787304, -0.011909712, -0.0062326887, -0.0015110573, -0.034982253, -0.017865727, 0.04694295, -0.019256044, -0.011459812, -0.03279024, 0.037504967, 0.015645733, -0.0028296127, 0.004721716, 0.036797892, 0.02626419, 0.046068672, -0.04375198, 0.010342184, -0.029382963, -0.0058292556, -0.06746073, 0.008030204, 0.008024782, 0.005700028, -0.015520733, -0.004093155, -0.00010534809, 0.012893204, 0.0023931228, 0.01126746, 0.016491586, 0.03830754, 0.0028571405, 0.03271654, -0.0043229614, 0.0045110187, -0.009153749, 0.024263687, 0.0055661257, 0.014400457, -0.05771059, 0.018285295, -0.0006046087, -0.016670952, -0.01840553, 0.026424669, -0.007238593, -0.021955099, 0.010399976, -0.034346763, -0.0034545392, -0.029662624, -0.036934648, -0.0053665936, 0.022613026, 0.030365573, -0.22286756, 0.0279257, 0.009698295, -0.0027735352, 0.009148371, 0.034103528, -0.0014950859, -0.0013396575, 0.010589369, -0.0033245191, 0.01820751, 0.048688825, 0.012388272, -0.0005483876, 0.008158384, 0.0049483883]
]
res = client.search(
collection_name=COLLECTION_NAME,
#highlight-next-line
data=SEARCH_VECTORS_1,
output_fields=["title", "link"],
limit=3
)
print(res)
# Output
#
# [
# [
# {
# "id": 13,
# "distance": 1.000000238418579,
# "entity": {
# "title": "Trying to Do It All? Why Delegating Will Get You Better Results",
# "link": "https://medium.com/swlh/trying-to-do-it-all-why-delegating-will-get-you-better-results-3666ca65a84d"
# }
# },
# {
# "id": 144,
# "distance": 0.7938575744628906,
# "entity": {
# "title": "Want Product/Market Fit? Double Your Effort to Understand Failure",
# "link": "https://medium.com/swlh/want-product-market-fit-double-your-effort-to-understand-failure-b5341b0fe11a"
# }
# },
# {
# "id": 51,
# "distance": 0.769919753074646,
# "entity": {
# "title": "What if Facebook had to pay you for the profit they are making?",
# "link": "https://medium.com/swlh/what-if-facebook-had-to-pay-you-for-the-profit-they-are-making-7571115139a7"
# }
# }
# ]
# ]
# 6. bulk vector search
SEARCH_VECTORS_2 = [
[0.067084685, 0.012763148, -0.019562697, 0.041436773, -0.0071800495, 0.0068031778, 0.026846228, 0.0018171414, -0.017885696, -5.144758e-06, 0.021773607, 0.03877538, -0.04305705, 0.0040129432, -0.026112838, 0.02804271, 0.039550524, 0.009657041, 0.006124304, -0.03587743, -0.047360566, 0.047994304, -0.0026333537, -0.009287217, -0.009531011, -0.011128416, -0.0008089687, -0.012472947, -0.029548844, 0.018742273, -0.010443951, 0.03686704, -0.0062725404, -0.033065494, -0.037441205, -0.021756195, 0.015326248, -0.021178713, 0.004664664, -0.058233317, 0.00014567704, -0.004691694, -0.020430796, 0.018015612, -0.025032096, -0.0017203568, -0.15430935, -0.021535715, -0.023457527, 0.0091514895, 0.010723129, 0.029708661, 0.013871869, 0.033172037, -0.0039122645, 0.042791307, 0.0011374152, 0.008869271, 0.0029381646, -0.03368228, -0.0060222964, 0.0043577226, -0.013947957, 0.009290493, -0.012540634, 0.00273017, 0.022820204, 0.026924528, -0.022086479, -0.060783494, 0.016817782, -0.048939366, 0.019599559, 0.006206328, -0.002290718, -0.03590918, -0.018897992, -0.0042805285, 0.011843795, -0.017050676, -0.013486483, 0.020436956, 0.007546162, -0.02693981, 0.030861974, -0.013079769, -0.0062708417, 0.05667484, -0.011895964, -0.019626874, 0.019658655, -0.01592551, 0.048192456, 0.025277842, 0.012791405, -0.01912894, 0.018978393, -0.014250473, 0.01703835, 0.03480962, 0.0063537387, -0.042249113, -0.00043459053, -0.0018622469, -0.009442041, 0.017618423, 0.031027863, -0.022231897, -0.0376824, -0.04357785, -0.03438631, 0.029176407, -0.029065061, 0.017853128, -0.03679002, -0.01343899, 0.010235031, -0.0064424444, -0.013969234, -0.02093429, 0.03242403, 0.081176125, 0.047020823, -0.0053490726, 0.026101233, -0.011347566, 0.007888563, 0.033007886, -0.0329995, 0.020665517, 0.04136607, 0.035906706, -0.03490551, -0.0053841537, -0.011719225, -0.051888738, 0.013233477, 0.024516504, 0.022379812, -0.019201498, -0.06641265, 0.009281021, -0.117206626, 0.01930055, 0.013030688, -0.020969143, -0.009417929, 0.006143121, 0.011270797, -0.00027001393, 0.010003906, 0.01708631, -0.016258342, 0.024448106, 0.016732391, 0.037978027, -0.016748767, -0.05220301, -0.001617842, 0.009138166, 0.012382751, -0.015260991, 0.0054500694, -0.028620195, 0.008110576, -0.033788614, 0.0039199656, 0.020877296, -0.0019069016, 0.02486228, -0.054951686, 0.016345063, 0.0031373682, -0.018256962, -0.032652415, -0.0015583407, 0.035434894, 0.0057147266, 0.017852651, 0.019489108, -0.059383944, 0.047080282, 0.013476704, -0.034344416, -0.021401603, -0.0047124117, 0.03282476, 0.0310293, 0.0059062857, 0.017943364, -0.025785094, -0.008369121, 0.043759152, -0.05713893, 0.080261536, -0.019094586, -0.030248133, 0.031530432, -0.0078049167, -0.0072037927, 0.0037481654, -0.0052728076, 0.00545658, -0.03494784, -0.040497135, 0.12920712, 0.03730018, 0.013103399, -0.02073502, 0.023221344, 0.021372316, -0.020007843, -0.02039844, -0.034015827, -0.024792869, 0.02398402, -1.8960509e-05, 0.042674873, 0.023521705, -0.020507248, 0.049451265, -0.008896, 0.017111603, 0.04130102, 0.0117504895, 0.043999847, 0.013219506, 0.035527136, 0.01432157, -0.07690921, 0.0035484403, 0.0522345, 0.004887539, -0.04470897, 0.014145424, -0.002322764, -0.0006711694, -0.005171149, 0.009290426, -0.018422173, -0.016586823, 0.0136319, 0.001188213, 0.057175174, -0.017342528, 0.027671505, -0.042186387, 0.011572681, -0.021391649, -0.0033423735, -0.037542935, 0.005212495, -0.024934493, -0.032270443, 0.010533489, 0.016265279, -0.012949663, -0.0015713088, -0.0036994736, 0.028886143, -0.033987533, -0.014176839, -0.041233867, -0.0067877164, 0.021908464, -0.005136184, -0.04080503, -0.069470644, 0.021477029, 0.0458543, 0.023247648, 0.030698316, -0.039564475, -0.088643864, -0.02261754, 0.0045118416, 0.024566436, 0.046393085, -0.02216351, 0.00024930306, -0.021449536, 0.048293836, 0.014707752, 0.009909892, 0.019592311, -0.03260006, 0.050508883, 0.0155325895, -0.02318899, -0.009280294, -0.00054715853, 0.035641793, -0.03841018, -0.054086722, 0.042260613, -0.020135589, -0.009209342, -0.016331578, 0.013113423, 0.0073161772, -0.022116443, 0.0022690226, -0.013815287, -0.014608138, 0.011891289, -0.03987457, -0.024125988, -0.008877569, -0.542385, -0.0046418267, -0.014450025, 0.01846464, -0.0061272443, -0.03645763, 0.014598165, 0.0012847413, -0.013254723, -0.041983943, -0.0054658838, 0.048491694, 0.0032385683, 0.040096495, 0.013880233, 0.03769998, 0.057995755, 0.018937912, 0.04356247, 0.029422382, -0.005512912, -0.008185129, 0.03007349, 0.04359526, 0.025219219, 0.052304782, -0.056456745, 0.024315445, -0.01517588, 0.008818714, -0.042450584, -0.007820796, 0.000957012, -0.004087399, -0.0027900063, -0.00019836269, 0.03993002, -0.022075728, -0.009659706, 0.0008730084, 0.0012557252, 0.041804712, -0.008591671, 0.02663977, 0.014103868, -0.01176633, 0.01425333, -0.030660864, -0.012643644, 0.012647466, 0.003992557, -0.013068864, 0.054271225, 0.02956457, -0.0015290714, -0.04789449, 0.016195755, -0.004720862, -0.025444793, 0.040675398, 0.017635116, -0.007445805, -0.012083248, -0.006593255, -0.03685501, 0.018322079, -0.003794312, -0.038512487, 0.068935715, -0.0013345716, -0.028566675, 0.03148971, 0.045071516, -0.04984122, 0.020047592, 0.036119983, -0.024444863, 0.03837795, 0.036707856, 0.03046198, -0.08290884, -0.038781814, 0.0078084655, -0.044541225, 0.033088982, -0.05095062, -0.02788698, 0.028235609, 0.0011700212, 0.055747226, 0.049074765, -0.003699976, 0.018218154, 0.036603563, 0.03944698, 0.12145004, 0.044003617, -0.030536028, 0.013713464, -0.03582614, 0.0341466, -0.011713959, 0.028322138, -0.016736003, -0.021829609, -0.023059523, -0.0518097, 0.04348778, 0.025956193, -0.020402918, 0.022030508, 0.026951065, -0.03857684, 0.009612844, 0.04294417, -0.003245114, -0.018945828, 0.030980175, 0.030147055, -0.036157973, 0.014093662, 0.024588404, 0.008243173, -0.021246169, -0.017501911, 0.008693468, -0.0032473255, -0.001274957, 0.03229837, 0.049598627, -0.0022973216, 0.0033379667, -0.0066531445, -0.040082663, -0.025768949, -0.018924223, -0.013402923, 0.02877348, -0.03348661, -0.04335803, 0.030348256, 0.0030123033, -0.018637355, 0.031215603, 0.009703184, -0.012250483, -0.017783208, -0.0012993875, 0.03494102, 0.022051882, -0.0037361863, 0.0144340005, 0.0007772601, -0.022412954, 0.016905298, 0.0051659457, 0.019687157, -0.036714446, 0.011084603, 0.032493114, 0.04167994, 0.0052087703, -0.1340144, 0.020904416, 0.03880898, -0.004997134, -0.03379452, -0.0027288045, 0.0017003448, 0.045896202, -0.0251439, -0.04012667, 0.008189411, 0.009342803, -0.008737683, -0.016964946, -0.013769445, -0.0039055822, 9.105085e-05, -0.0014306931, -0.01370459, -0.03021115, -0.03371149, 0.019536795, 0.034956485, -0.035423536, -0.0001793012, 0.031117702, -0.03684463, -0.03441676, -0.0032415327, 0.023432557, 0.04477826, 0.021365063, -0.016579695, -0.041772667, -0.007235941, 0.051481932, 0.020723345, 0.0027636953, -0.01670209, 0.010251357, -0.005765525, -0.008929097, 0.030185755, -0.047766156, 0.045013517, 0.007230817, -0.0021736303, 0.016125442, -0.030083746, -0.060406208, -0.04190568, 0.024696488, -0.01143736, -0.032770127, 0.005331429, -0.01818162, -0.03302437, 0.004453679, 0.07522827, -0.0026776046, -0.04824753, -0.003460575, -0.018161483, 0.0011453037, 0.0049157077, -0.07813969, 0.018300964, -0.0051002055, 0.02079756, 0.0035663457, -0.007433807, 0.04271708, -0.009733036, -0.0118808625, 0.013809495, 0.059501708, -0.021575449, -0.05935755, -0.0035455024, -0.02693452, -0.017190132, -0.016059617, -0.014253175, 0.049172483, 0.021585494, -0.019737553, -0.042685244, -0.0142481, 0.0101315025, 0.017116902, -0.026357282, -0.04408546, 0.040629655, -0.0049285134, -0.01832608, -0.03478675, -0.0026891741, 0.011267896, -0.013378763, 0.00038937217, -0.033136602, -0.019912021, 0.0005154215, -0.014184948, -0.0039172196, -0.034798123, 0.020901538, -0.031190442, -0.0188423, 0.00089758966, -0.031973753, 0.041402347, -0.024570376, 0.009384613, -0.015127522, -0.0066246563, 0.0053242114, 0.018116094, 0.03593241, 0.0138109075, 0.0054535866, -0.006286201, -0.016241968, -0.014714209, 0.044731583, 0.0049299267, 0.018034935, -0.021785134, 0.0039582113, 0.007881306, 0.0025793097, -0.042218346, 0.009456891, 0.036283787, 0.0146247605, -0.0098402975, 0.0037902303, -0.03996696, -0.024825035, -0.002218162, 0.02680719, -0.06429411, 0.0041645677, 0.036587194, 0.016344147, -0.011895876, -0.0047728666, -0.012840077, 0.024035104, -0.004805998, 0.013976597, 0.04548439, -0.0342657, -0.013345326, 0.035000067, -0.045974903, -0.0014153081, 0.025639469, 0.015180726, -0.025232967, 0.062155142, -0.0074546896, -0.026970528, 0.024351746, 0.009845394, -0.0030415193, 0.018005231, 0.028550927, 0.058446534, 0.052299928, -0.005342624, -0.017217442, -0.00256019, -0.042966325, 0.05070154, -0.001058939, -0.00032248945, -0.0008024313, 0.03253681, -0.0052430714, 0.004956301, -0.002408752, -0.0053530117, 0.021631103, 0.05547592, -0.009938055, -0.034457657, 0.027521914, 0.01240609, 0.0119028855, 0.0024289973, -0.025401114, 0.0033537287, -0.046087854, 0.0025625397, 0.02055915, -0.03852718, -0.08814635, 0.017578295, 0.007510919, -0.03178676, 0.018278323, 0.04088973, 0.01573187, 0.030416224, 0.024065565, -0.01635669, 0.011522964, -0.019805027, -0.021166855, 0.02497459, 0.01471735, -0.02437242, -0.035158277, 0.0053584804, 0.00015995267, 0.015659729, -0.01616051, -0.0059671486, -0.0074259965, -0.037194114, 0.01918367, 0.018669305, 0.00238937, -0.013435635, 0.007787304, -0.011909712, -0.0062326887, -0.0015110573, -0.034982253, -0.017865727, 0.04694295, -0.019256044, -0.011459812, -0.03279024, 0.037504967, 0.015645733, -0.0028296127, 0.004721716, 0.036797892, 0.02626419, 0.046068672, -0.04375198, 0.010342184, -0.029382963, -0.0058292556, -0.06746073, 0.008030204, 0.008024782, 0.005700028, -0.015520733, -0.004093155, -0.00010534809, 0.012893204, 0.0023931228, 0.01126746, 0.016491586, 0.03830754, 0.0028571405, 0.03271654, -0.0043229614, 0.0045110187, -0.009153749, 0.024263687, 0.0055661257, 0.014400457, -0.05771059, 0.018285295, -0.0006046087, -0.016670952, -0.01840553, 0.026424669, -0.007238593, -0.021955099, 0.010399976, -0.034346763, -0.0034545392, -0.029662624, -0.036934648, -0.0053665936, 0.022613026, 0.030365573, -0.22286756, 0.0279257, 0.009698295, -0.0027735352, 0.009148371, 0.034103528, -0.0014950859, -0.0013396575, 0.010589369, -0.0033245191, 0.01820751, 0.048688825, 0.012388272, -0.0005483876, 0.008158384, 0.0049483883],
[0.031961977, 0.00047043373, -0.018263113, 0.027324716, -0.0054595284, -0.014779159, 0.017511465, 0.030381083, -0.018930407, -0.03372473, -0.009049301, 0.05401713, -0.030117748, -0.05029242, -0.004565209, -0.013697411, 0.0091306195, 0.020263411, 0.022377398, -0.013710004, 0.00041742, 0.0196022, -0.03045922, -0.009036885, 0.015411235, -0.010344614, 0.025562054, 0.017688023, -0.030953526, -0.016898274, 0.026576879, 0.027959209, -0.003575494, -0.021995515, -0.013143332, -0.008411754, 0.015792666, -0.007804189, 0.011127249, -0.018469824, 0.000866601, -0.0047294814, 0.023057077, 0.024769971, 0.006347016, -0.0053651906, -0.10139431, 0.009744879, -0.004652395, 0.004365174, -0.055456053, 0.03606845, -0.00094139896, 0.01640304, -0.01252126, 0.007557613, -0.021284489, -0.007097941, -0.02953809, 0.012779461, 0.01165686, 0.017842839, -0.051064152, 0.02416306, 0.0010631426, 0.04505233, -0.010680273, 0.03516956, -0.032654032, 0.0048729796, 0.04184754, -0.022647992, -0.05048803, 0.017783897, -0.006307326, -0.0036616833, -0.03680091, -0.002489206, 0.010861639, 0.01722319, -0.0085470015, 0.052702323, 0.045617685, -0.03452536, 0.07228468, -0.0032563882, 0.0072233807, 0.039652966, 0.013009299, -0.00073530525, -0.029937685, -0.015898889, 0.017194541, 0.041268878, 0.03691164, 0.0021090403, -0.0044218805, -0.0003518283, 0.03208571, 0.03872059, -0.015585088, -0.031691972, -0.027204208, -0.027799087, -0.03140582, -0.024144609, -0.029131236, -0.0006166679, -0.010534395, -0.053412274, -0.026039477, 0.02327985, 0.002468529, -0.015971841, -0.03870977, 0.0015068256, 0.029168412, 0.025979232, -0.00014848322, 0.023480166, 0.022882162, 0.1086864, 0.04039409, 0.04686041, 0.030854652, 0.0011865695, 0.023846114, 0.03404549, 0.027745683, -0.011852315, 0.02592257, 0.09672646, 0.04493555, -0.027386012, -0.015208758, -0.02407686, 0.004940932, 0.03843349, 0.009353459, -9.5053925e-05, -0.034731977, 0.011731949, -0.082125075, 0.034289576, 0.046927046, 0.036367156, -0.020566383, -0.011743045, 0.005362335, 0.014873384, -0.041561183, 0.027565314, -0.047460195, 0.028267229, -0.02931979, 0.043748844, -0.008986446, -0.036197904, -0.0039762477, 0.00384613, 0.026702058, -0.013507277, -0.018546203, -0.038978007, 0.008370236, -0.059048153, -0.0088269655, 0.030615881, 0.061521176, 0.040141247, -0.042904384, -0.0017646506, -0.012129865, -0.025165217, -0.007414848, -0.03211762, 0.016645478, -0.003678877, 0.02817977, 0.033541426, -0.030827818, 0.014391739, -0.016986696, -0.009304953, 0.010068301, 0.0012533539, 0.054744214, -0.03355412, -0.0126412, 0.006665331, -0.051595133, -0.026037361, 0.024609802, -0.03966661, 0.08104592, -0.011226513, -0.04584874, 0.055855907, 0.024856847, 0.04370813, 0.00019327056, -0.0014419332, 0.02126272, -0.015198758, -0.028715013, 0.1175778, 0.0018902348, 0.00060474704, -0.018893233, 0.014306088, -0.0014934064, 0.01141921, 0.0011305047, -0.04216744, -0.022631632, 0.021396926, -0.0014329525, -0.019445604, 0.013686111, 0.01649869, 0.06171409, -0.021276126, 0.0263158, 0.03875992, -0.028981235, 0.05266261, 0.054521, 0.037886284, 0.044632472, -0.05402573, -0.05315056, -0.010329648, 0.0055773426, -0.0045997864, -0.025924252, -0.0019360946, -0.0008645076, -0.03587916, 0.0061763, 0.036449447, 0.01495319, 0.012858187, -0.007967018, 0.039387755, -0.013221118, 0.0036750333, -0.01904389, -0.00033562203, 0.011822021, -0.007844666, 0.010633819, 0.031686552, 0.013216273, -0.06986176, -0.0050058817, 0.03312041, -0.008020069, -0.007771589, -0.01182697, 0.042453192, -0.03915573, 0.020194814, -0.00954806, 0.014636779, -0.0020046192, -0.023423301, -0.030332584, -0.0628702, 0.0472391, 0.012135565, 0.026438866, -0.01713713, -0.023381876, -0.13993254, 0.029665118, -0.036457572, 0.011218912, 0.038330603, -0.056250863, -0.03564765, -0.023168502, 0.06854669, 0.01736419, -0.005506834, -0.023775242, 0.0006358431, 0.008166359, -0.044492476, -0.02230922, -0.029222934, 0.006484247, -0.00048863835, -0.037827164, -0.026856521, 0.03414912, 0.006874869, -0.012198071, 0.00081886543, 0.00741021, -0.010242518, -0.0132256355, 0.015110306, 0.0155827785, 0.0049608652, 0.011982397, -0.0037450858, -0.040991265, 0.006001457, -0.48184368, -0.014675001, -0.019399617, -0.00050807477, -0.020829525, 0.010311649, 0.0091862045, -0.048885785, 0.035956666, 0.013535662, -0.018462244, 0.050372835, -0.02836579, 0.033545148, -0.0005632335, 0.007023988, 0.044697817, -0.002525599, 0.025722712, 0.019185606, -0.031526912, 0.031805854, 0.03019657, 0.011702875, 0.0072402623, 0.034088686, -0.055395007, 0.0133933285, 0.010695204, -0.022150824, -0.009092343, -0.020708743, 0.014677717, -0.02691326, -0.041022483, -0.010728332, 0.05170642, 0.009286708, 0.010499943, 0.010623252, -0.007898877, 0.026833422, 0.020545354, 0.0045525357, 0.026015494, 0.0013438065, -0.008843245, -0.03299382, 0.0036264951, 0.0631423, -0.043489218, -0.0067020636, 0.08263549, 0.02432318, -0.0018398056, -0.035592306, 0.037945632, 0.02471174, 0.018099476, 0.008289202, 0.057471566, -0.034602158, -0.0030834016, -0.077851646, 0.000621722, -0.010408296, -0.01503258, -0.021677738, 0.035202455, 0.02111145, -0.059643175, -0.008791222, -0.0049411054, -0.06235482, 0.05213403, -7.3968346e-05, -0.042797476, 0.025670705, 0.031570684, 0.005316893, -0.036642972, -0.045712292, -0.031201003, 0.0013435282, -0.000494309, -0.03169252, -0.020528838, 0.01809954, -0.019055236, 0.03645839, 0.06659739, -0.030998535, -0.011546504, 0.045022737, 0.04093621, 0.0534356, 0.060189668, -0.068081446, -0.0048630824, -0.022713043, 0.028602442, -0.043265317, -0.04292418, -0.021301687, -0.012547421, 0.0079896515, -0.016087562, 0.036705207, 0.037259102, -0.02395996, -0.042752225, 0.014155132, -0.025802076, -0.012854622, 0.027047012, 0.033388477, -0.0072962856, -0.030946407, 0.010230067, -0.031012211, -0.018188275, 0.029999569, 0.012055036, 0.020398764, -0.013843629, -0.039526306, 0.020703869, -0.0037418825, -0.0052683037, -0.017438497, -0.02282057, 0.0012672462, 0.0018585115, -0.012557607, -0.010483216, -0.019720279, 0.019221477, 0.04736351, 0.005414666, -0.057573926, -0.0071921526, -0.0001097653, -0.027598547, 0.027446415, -0.008795139, 0.001392441, 0.0012335415, -0.008592807, -0.0432095, 0.021367712, -0.014368737, -0.048905294, 0.03449548, 0.014495232, -0.012759583, 0.002067632, 0.025151605, 0.023311006, 0.053315796, -0.018494522, 0.026421981, -0.0087005105, -0.096432306, -0.0025691572, 0.035672404, -0.05256038, -0.0069832117, -0.01132947, -0.019128852, 0.047870636, -0.017571028, -0.00736777, -0.02712124, 0.0124487365, 0.030766713, -0.0071845357, 0.013875514, -0.0061107697, -0.0118085835, -0.0043757795, 0.035335075, -0.031514447, 0.008930741, 0.060583394, 0.009514371, -0.06121421, -0.0059463717, -0.014056502, -0.00457576, -0.018932668, -0.0047621797, 0.014372747, 0.05434973, -0.0069508883, -0.018155267, -0.01424335, 0.01727908, 0.015375504, -0.0043006744, -0.039005376, 0.0011630051, 0.030958423, -0.0024497176, 0.026296826, 0.032621946, -0.043037336, -0.0062458026, -0.0024066344, -0.025261067, -0.012876287, 0.004674665, -0.062701315, -0.036242086, -0.015491459, -0.033093378, -0.003791472, 0.003521233, 0.015312638, -0.018087002, 0.0007275054, -0.025592119, -0.033027202, 0.0040619876, -0.0049337046, 0.012276444, 0.028485294, -0.0022711728, -0.037957348, 0.026373198, 0.011347564, 0.02729493, -0.012358346, 0.0038525765, 0.045374937, -0.021545382, -0.015508571, -0.011422388, 0.030073423, -0.035008345, -0.045318596, 0.030025236, 0.027738895, -0.010382076, 0.0018489916, -0.051705457, -0.00014905288, -0.01871698, -0.026817072, -0.065421715, -0.009121612, 0.020758322, -0.01539622, -0.0025403304, -0.058611013, 0.03054597, 0.021318326, 0.0027275842, -0.020702, -0.004794398, 0.019018736, -0.012444672, -0.019887973, -0.022113265, 0.023049643, -0.014587576, 0.014351464, 0.029817551, -0.0609792, 0.042052478, -0.055451162, -0.034356594, -0.047547698, -0.01826999, 0.040954057, 0.002969797, -0.056506813, -0.0073451693, -0.02482, 0.03168265, 0.015525525, 0.07468302, 0.01469982, 0.00210511, -0.019698266, -0.00031182918, -0.019210724, 0.041207567, 0.0053758505, 0.009472572, 0.03771915, -0.06461313, 0.04082511, -0.008058872, 0.0012331214, 0.0069069173, 0.0024821213, 0.006390242, 0.0011468151, -0.038794484, -0.063377164, -0.014241851, 0.04237302, 0.06795088, -0.023934761, -0.020242302, 0.02311365, -0.012824183, 0.03533031, -0.008410466, 0.02789391, -0.013549344, 0.022365555, 0.025989164, 0.04313728, -0.028337618, 0.026092393, 0.024711346, -0.052706428, 0.005730622, 0.022862181, -0.0076183174, -0.037243042, 0.052232295, -0.016049191, -0.06881278, 0.031964153, -0.021035925, 0.0138404025, -0.0013810501, 0.016167158, 0.034111433, 0.07161581, -0.025092546, -0.04386276, -0.0040376517, -0.025154384, 0.03385207, 0.015494304, 0.0048881858, 0.016264858, 0.061570168, 0.029936614, -0.01829368, -0.0037140124, -0.02359431, 0.023544896, 0.020937245, -0.0061871763, -0.045603115, 0.053354852, 0.040365223, 0.01763893, -0.020082904, 0.0067172833, 0.008561443, 0.00088409515, 0.0058731064, -0.016091827, 0.021013025, -0.080045305, 0.051248446, 0.051069897, -0.020342922, 0.003785443, -0.023021897, 0.018125402, 0.053128835, 0.007378299, 0.0270741, 0.02051721, -0.038264796, 0.027366923, -0.021771278, 0.027172359, -0.01405901, -0.025535831, -0.026873125, 0.025676413, -0.034890138, 0.009825487, -0.000653567, -0.0041931183, -0.03914068, -0.012084683, 0.021727156, 0.026943136, -0.024454104, 0.014687368, -0.036083054, 0.0052459547, -0.033593263, -0.037296012, -0.00528183, 0.024822053, -0.032910015, 0.013125118, -0.019655148, 0.050365735, 0.0025480876, 0.011558444, 0.02348081, 0.0059274384, 0.021103512, 0.025836773, -0.011869778, 0.024600193, -0.0393065, -0.018619377, -0.03744179, -0.026498258, 0.027013863, 0.039253354, -0.008169781, -0.009831139, -0.002388968, 0.04232686, 0.010924937, -0.034946863, 0.0039843144, 0.014260961, -0.06428069, -0.03166362, 0.024884656, 0.027559036, 0.0057664, 0.007130555, 0.029336175, 0.016878324, -0.02320544, 0.021938594, 0.008355895, -0.007115111, -0.023438789, 0.03528865, -0.009152654, -0.008653632, 0.0082724, -0.0025690612, 0.03129816, -0.007876752, -0.017509712, 0.024677664, 0.0370758, 0.021148562, -0.27696472, 0.0028338798, -0.014097512, -0.019267568, -0.03345135, 0.006941969, 0.010284976, 0.0012813237, -0.007259589, 0.006475924, 0.012507553, 0.033468552, 0.025855746, -0.03161831, 0.0067092087, 0.034458436]
]
res = client.search(
collection_name=COLLECTION_NAME,
#highlight-next-line
data=SEARCH_VECTORS_2,
output_fields=["title", "link"],
limit=3
)
print(res)
# Output
#
# [
# [
# {
# "id": 13,
# "distance": 1.000000238418579,
# "entity": {
# "title": "Trying to Do It All? Why Delegating Will Get You Better Results",
# "link": "https://medium.com/swlh/trying-to-do-it-all-why-delegating-will-get-you-better-results-3666ca65a84d"
# }
# },
# {
# "id": 144,
# "distance": 0.7938575744628906,
# "entity": {
# "title": "Want Product/Market Fit? Double Your Effort to Understand Failure",
# "link": "https://medium.com/swlh/want-product-market-fit-double-your-effort-to-understand-failure-b5341b0fe11a"
# }
# },
# {
# "id": 51,
# "distance": 0.769919753074646,
# "entity": {
# "title": "What if Facebook had to pay you for the profit they are making?",
# "link": "https://medium.com/swlh/what-if-facebook-had-to-pay-you-for-the-profit-they-are-making-7571115139a7"
# }
# }
# ],
# [
# {
# "id": 2,
# "distance": 1.0,
# "entity": {
# "title": "How Can We Best Switch in Python?",
# "link": "https://medium.com/swlh/how-can-we-best-switch-in-python-458fb33f7835"
# }
# },
# {
# "id": 140,
# "distance": 0.8028181195259094,
# "entity": {
# "title": "How I Implemented a Swift HTTP Request Helper Without a Working Server",
# "link": "https://medium.com/swlh/how-i-implemented-a-swift-http-request-helper-without-a-working-server-9f315bd7d0ae"
# }
# },
# {
# "id": 108,
# "distance": 0.8000683784484863,
# "entity": {
# "title": "What Is Natural Language Processing? A Gentle Introduction to NLP",
# "link": "https://towardsdatascience.com/what-is-natural-language-processing-a-gentle-introduction-to-nlp-4ed219a768ad"
# }
# }
# ]
# ]
# 7-1. search with filters
res = client.search(
collection_name=COLLECTION_NAME,
data=SEARCH_VECTORS_1,
# highlight-start
filter="10 < reading_time < 15",
output_fields=["title", "reading_time"],
# highlight-end
limit=3
)
print(res)
# Output
#
# [
# [
# {
# "id": 46,
# "distance": 0.7317952513694763,
# "entity": {
# "title": "The Right Way to Delegate Tasks to Your Employees",
# "reading_time": 11
# }
# },
# {
# "id": 7,
# "distance": 0.7186760902404785,
# "entity": {
# "title": "Building Comprehensible Customer Churn Prediction Models",
# "reading_time": 13
# }
# },
# {
# "id": 40,
# "distance": 0.7009614109992981,
# "entity": {
# "title": "Actively Fighting Distraction",
# "reading_time": 12
# }
# }
# ]
# ]
# 7-2. search with filters
res = client.search(
collection_name=COLLECTION_NAME,
data=SEARCH_VECTORS_1,
# highlight-start
filter='claps > 1500 and responses > 15',
output_fields=['title', 'claps', 'responses'],
# highlight-end
limit=3
)
print(res)
# Output
#
# [
# [
# {
# "id": 130,
# "distance": 0.7031335830688477,
# "entity": {
# "title": "The Only \u201cCompetition\u201d Slide You\u2019ll Ever Need in a Pitch Deck",
# "claps": 1940,
# "responses": 25
# }
# },
# {
# "id": 66,
# "distance": 0.6701224446296692,
# "entity": {
# "title": "How to Be Memorable in Social Settings",
# "claps": 8600,
# "responses": 34
# }
# },
# {
# "id": 69,
# "distance": 0.5535616278648376,
# "entity": {
# "title": "Top 10 In-Demand programming languages to learn in 2020",
# "claps": 3000,
# "responses": 18
# }
# }
# ]
# ]
# 7-3. search with filters
res = client.search(
collection_name=COLLECTION_NAME,
data=SEARCH_VECTORS_1,
# highlight-start
filter='publication == "Towards Data Science"',
output_fields=["title", "publication"],
# highlight-end
limit=3
)
print(res)
# Output
#
# [
# [
# {
# "id": 84,
# "distance": 0.7343761324882507,
# "entity": {
# "title": "Diving deeper into Unity-ML Agents",
# "publication": "Towards Data Science"
# }
# },
# {
# "id": 70,
# "distance": 0.6936983466148376,
# "entity": {
# "title": "How bad will the Coronavirus Outbreak get? \u2014 Predicting the outbreak figures",
# "publication": "Towards Data Science"
# }
# },
# {
# "id": 94,
# "distance": 0.6913699507713318,
# "entity": {
# "title": "Why Machine Learning Validation Sets Grow Stale",
# "publication": "Towards Data Science"
# }
# }
# ]
# ]
# 7-4. search with filters
res = client.search(
collection_name=COLLECTION_NAME,
data=SEARCH_VECTORS_1,
# highlight-start
filter='publication not in ["Towards Data Science", "Personal Growth"]',
output_fields=["title", "publication"],
# highlight-end
limit=3
)
print(res)
# Output
#
# [
# [
# {
# "id": 13,
# "distance": 1.000000238418579,
# "entity": {
# "title": "Trying to Do It All? Why Delegating Will Get You Better Results",
# "publication": "The Startup"
# }
# },
# {
# "id": 144,
# "distance": 0.7938575744628906,
# "entity": {
# "title": "Want Product/Market Fit? Double Your Effort to Understand Failure",
# "publication": "The Startup"
# }
# },
# {
# "id": 51,
# "distance": 0.769919753074646,
# "entity": {
# "title": "What if Facebook had to pay you for the profit they are making?",
# "publication": "The Startup"
# }
# }
# ]
# ]
# 7-5. search with filters
res = client.search(
collection_name=COLLECTION_NAME,
data=SEARCH_VECTORS_1,
# highlight-start
filter='title like "Top%"',
output_fields=["title", "link"],
# highlight-end
limit=3
)
print(res)
# Output
#
# [
# [
# {
# "id": 76,
# "distance": 0.5861995220184326,
# "entity": {
# "title": "Top 20 Data Science Discord servers to join in 2020",
# "link": "https://towardsdatascience.com/top-20-data-science-discord-servers-to-join-in-2020-567b45738e9d"
# }
# },
# {
# "id": 74,
# "distance": 0.5774341821670532,
# "entity": {
# "title": "Top 10 Artificial Intelligence Trends for 2020",
# "link": "https://towardsdatascience.com/top-10-ai-trends-for-2020-d6294cfee2bd"
# }
# },
# {
# "id": 97,
# "distance": 0.5768393874168396,
# "entity": {
# "title": "Top 5 AI Conferences To Visit in Europe in 2020",
# "link": "https://towardsdatascience.com/top-5-ai-conferences-to-visit-in-europe-in-2020-7a6f068aff34"
# }
# }
# ]
# ]
# 7-6. search with filters
res = client.search(
collection_name=COLLECTION_NAME,
data=SEARCH_VECTORS_1,
# highlight-start
filter='(publication == "Towards Data Science") and ((claps > 1500 and responses > 15) or (10 < reading_time < 15))',
output_fields=["title", "publication", "claps", "responses", "reading_time"],
# highlight-end
limit=3
)
print(res)
# Output
#
# [
# [
# {
# "id": 79,
# "distance": 0.6686539053916931,
# "entity": {
# "title": "Rage Quitting Cancer Research",
# "reading_time": 12,
# "publication": "Towards Data Science",
# "claps": 331,
# "responses": 3
# }
# },
# {
# "id": 103,
# "distance": 0.662158727645874,
# "entity": {
# "title": "A Primer on Domain Adaptation",
# "reading_time": 12,
# "publication": "Towards Data Science",
# "claps": 74,
# "responses": 0
# }
# },
# {
# "id": 99,
# "distance": 0.6571633219718933,
# "entity": {
# "title": "Finding optimal NBA physiques using data visualization with Python",
# "reading_time": 13,
# "publication": "Towards Data Science",
# "claps": 89,
# "responses": 0
# }
# }
# ]
# ]
# 8. Perform a query
res = client.query(
collection_name=COLLECTION_NAME,
filter='(publication == "Towards Data Science") and ((claps > 1500 and responses > 15) or (10 < reading_time < 15))',
output_fields=["title", "vector", "publication", "claps", "responses", "reading_time"],
limit=3,
)
print(res)
# Output
#
# [
# {
# "title": "Top 10 In-Demand programming languages to learn in 2020",
# "reading_time": 21,
# "publication": "Towards Data Science",
# "claps": 3000,
# "responses": 18,
# "vector": [
# -0.025530046,
# -0.0092489105,
# 0.012318489,
# 0.037440233,
# 0.016410477,
# 0.022736127,
# -0.001499891,
# 0.034556553,
# -0.0059547457,
# -0.055044662,
# "(758 more items hidden)"
# ],
# "id": 69
# },
# {
# "title": "Data Cleaning in Python: the Ultimate Guide (2020)",
# "reading_time": 12,
# "publication": "Towards Data Science",
# "claps": 1500,
# "responses": 7,
# "vector": [
# -3.8504484e-05,
# -0.04375324,
# 0.030649282,
# 0.021253644,
# -0.013177449,
# -0.026897375,
# 0.0068761935,
# -0.029512206,
# -0.015405618,
# -0.040675893,
# "(758 more items hidden)"
# ],
# "id": 73
# },
# {
# "title": "Top Trends of Graph Machine Learning in 2020",
# "reading_time": 11,
# "publication": "Towards Data Science",
# "claps": 1100,
# "responses": 0,
# "vector": [
# -0.008080184,
# -0.044017944,
# 0.058341485,
# 0.031070782,
# 0.0064219018,
# -0.026769096,
# -0.0072628907,
# 0.032785654,
# -0.03337949,
# -0.08574104,
# "(758 more items hidden)"
# ],
# "id": 75
# }
# ]
# 9. Retrieve a single entity by ID
res = client.get(
collection_name=COLLECTION_NAME,
ids=1
)
print(res)
# Output
#
# [
# {
# "id": 1,
# "vector": [
# 0.0039737443,
# 0.003020432,
# -0.0006188639,
# 0.03913546,
# -0.00089768134,
# 0.021238148,
# 0.014454661,
# 0.025742851,
# 0.0022063442,
# -0.051130578,
# "(758 more items hidden)"
# ],
# "title": "Dashboards in Python: 3 Advanced Examples for Dash Beginners and Everyone Else",
# "link": "https://medium.com/swlh/dashboards-in-python-3-advanced-examples-for-dash-beginners-and-everyone-else-b1daf4e2ec0a",
# "reading_time": 14,
# "publication": "The Startup",
# "claps": 726,
# "responses": 3
# }
# ]
# 10. Retrieve a set of entities by their IDs
res = client.get(
collection_name=COLLECTION_NAME,
ids=[1, 2, 3]
)
print(res)
# Output
#
# [
# {
# "title": "Dashboards in Python: 3 Advanced Examples for Dash Beginners and Everyone Else",
# "link": "https://medium.com/swlh/dashboards-in-python-3-advanced-examples-for-dash-beginners-and-everyone-else-b1daf4e2ec0a",
# "reading_time": 14,
# "publication": "The Startup",
# "claps": 726,
# "responses": 3,
# "id": 1,
# "vector": [
# 0.0039737443,
# 0.003020432,
# -0.0006188639,
# 0.03913546,
# -0.00089768134,
# 0.021238148,
# 0.014454661,
# 0.025742851,
# 0.0022063442,
# -0.051130578,
# "(758 more items hidden)"
# ]
# },
# {
# "title": "How Can We Best Switch in Python?",
# "link": "https://medium.com/swlh/how-can-we-best-switch-in-python-458fb33f7835",
# "reading_time": 6,
# "publication": "The Startup",
# "claps": 500,
# "responses": 7,
# "id": 2,
# "vector": [
# 0.031961977,
# 0.00047043373,
# -0.018263113,
# 0.027324716,
# -0.0054595284,
# -0.014779159,
# 0.017511465,
# 0.030381083,
# -0.018930407,
# -0.03372473,
# "(758 more items hidden)"
# ]
# },
# {
# "title": "Maternity leave shouldn\u2019t set women back",
# "link": "https://medium.com/swlh/maternity-leave-shouldnt-set-women-back-5019dd3129d8",
# "reading_time": 9,
# "publication": "The Startup",
# "claps": 460,
# "responses": 1,
# "id": 3,
# "vector": [
# 0.032572296,
# -0.011148319,
# -0.01688577,
# -0.0026665623,
# -0.011911687,
# -0.00067226397,
# 0.00549793,
# 0.024287743,
# -0.006913468,
# 0.0077994824,
# "(758 more items hidden)"
# ]
# }
# ]
# 11. Delete a single entity
res = client.delete(
collection_name=COLLECTION_NAME,
pks=0
)
print(res)
# Output
#
# None
# 12. Delete a set of entities in a batch
res = client.delete(
collection_name=COLLECTION_NAME,
pks=[1, 2, 3]
)
print(res)
# Output
#
# None
# 13. Drop a collection
res = client.drop_collection(
collection_name=COLLECTION_NAME
)
print(res)
# Output
#
# None