@@ -63,6 +63,56 @@ curl --request POST \
63
63
]
64
64
} '
65
65
66
+ # insert data
67
+ echo -e ' \n\n-- insert 4 rows into tbl1'
68
+ curl --request POST \
69
+ --url http://localhost:23820/databases/default_db/tables/tbl1/docs \
70
+ --header ' accept: application/json' \
71
+ --header ' content-type: application/json' \
72
+ --data '
73
+ [
74
+ {
75
+ "name": "row1",
76
+ "score": 3.0,
77
+ "dense_column": [1.0, 1.2, 0.8, 0.9, 0.5, 0.4, 0.3, 0.1],
78
+ "fulltext_column" : "random string 1",
79
+ "sparse_column": {"10":1.1, "20":2.2, "30": 3.3},
80
+ "tensor_column": [[1.0, 0.7, 0.9, 0.8], [1.1, 0.1, 0.3, 0.2]],
81
+ "multivector_column" : [[0.1, 0.3, 0.5, 0.7], [0.2, 0.4, 0.6, 0.8]],
82
+ "tensorarray_column" : [[[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0]]]
83
+ },
84
+ {
85
+ "name": "row2",
86
+ "score": 2.0,
87
+ "dense_column": [1.0, 2.2, 0.56, 1.9, 1.5, 0.2, 0.03, 0.14],
88
+ "fulltext_column" : "random string 2",
89
+ "sparse_column": {"10":4.1, "20":1.8, "30": 3.4},
90
+ "tensor_column": [[1.0, 0.4, 0.3, 0.0], [1.1, 0.5, 0.0, 0.7]],
91
+ "multivector_column" : [[0.2, 0.4, 0.6, 0.8], [0.1, 0.3, 0.5, 0.7]],
92
+ "tensorarray_column" : [[[0.7, 0.8], [1.4, 0.3]], [[0.5, 0.1]]]
93
+ },
94
+ {
95
+ "name": "row3",
96
+ "score": 4.0,
97
+ "dense_column": [1.0, 1.2, 0.8, 0.9, 0.5, 0.7, 0.6, 0.17],
98
+ "fulltext_column" : "random string 3",
99
+ "sparse_column": {"10":3.1, "20":1.2, "30": 4.3},
100
+ "tensor_column": [[1.0, 0.8, 0.5, 0.0], [1.1, 0.7, 0.0, 0.2]],
101
+ "multivector_column" : [[0.1, 0.7, 0.4, 0.6], [0.3, 0.5, 0.4, 0.8]],
102
+ "tensorarray_column" : [[[1.2, 0.7], [0.4, 0.1]], [[0.5, 0.4]]]
103
+ },
104
+ {
105
+ "name": "row4",
106
+ "score": 3.8,
107
+ "dense_column": [1.0, 1.2, 0.8, 0.9, 0.5, 0.4, 0.3, 0.1],
108
+ "fulltext_column" : "random string 4",
109
+ "sparse_column": {"10":1.4, "20":3.2, "30": 1.3},
110
+ "tensor_column": [[1.0, 0.3, 0.7, 0.6], [0.7, 1.4, 0.2, 0.5]],
111
+ "multivector_column" : [[0.6, 0.1, 0.4, 0.8], [0.7, 0.8, 0.5, 0.1]],
112
+ "tensorarray_column" : [[[1.2, 1.7], [0.6, 0.7]], [[1.3, 1.4]]]
113
+ }
114
+ ] '
115
+
66
116
# create HNSW index on dense vector column: 'dense_column'
67
117
echo -e ' \n\n-- create table index: hnsw_index'
68
118
curl --request POST \
@@ -165,8 +215,6 @@ curl --request POST \
165
215
"create_option": "ignore_if_exists"
166
216
} '
167
217
168
-
169
-
170
218
# list table indexes
171
219
echo -e ' \n\n-- list table indexes: hnsw_index, sparse_index, fulltext_index, bmp_index should be included'
172
220
curl --request GET \
@@ -203,6 +251,66 @@ curl --request GET \
203
251
--url http://localhost:23820/databases/default_db/tables/tbl1/indexes/bmp_index \
204
252
--header ' accept: application/json'
205
253
254
+ # show table tbl1 hnsw_index segment 0
255
+ echo -e ' \n\n-- show tbl1 hnsw_index segment 0'
256
+ curl --request GET \
257
+ --url http://localhost:23820/databases/default_db/tables/tbl1/indexes/hnsw_index/segment/0 \
258
+ --header ' accept: application/json'
259
+
260
+ # show table tbl1 hnsw_index segment 0 chunk 0
261
+ echo -e ' \n\n-- show tbl1 hnsw_index segment 0 chunk 0'
262
+ curl --request GET \
263
+ --url http://localhost:23820/databases/default_db/tables/tbl1/indexes/hnsw_index/segment/0/chunk/0 \
264
+ --header ' accept: application/json'
265
+
266
+ # show table tbl1 multi_vector_hnsw_index segment 0
267
+ echo -e ' \n\n-- show tbl1 multi_vector_hnsw_index segment 0'
268
+ curl --request GET \
269
+ --url http://localhost:23820/databases/default_db/tables/tbl1/indexes/multi_vector_hnsw_index/segment/0 \
270
+ --header ' accept: application/json'
271
+
272
+ # show table tbl1 multi_vector_hnsw_index segment 0 chunk 0
273
+ echo -e ' \n\n-- show tbl1 multi_vector_hnsw_index segment 0 chunk 0'
274
+ curl --request GET \
275
+ --url http://localhost:23820/databases/default_db/tables/tbl1/indexes/multi_vector_hnsw_index/segment/0/chunk/0 \
276
+ --header ' accept: application/json'
277
+
278
+ # show table tbl1 fulltext_index segment 0
279
+ echo -e ' \n\n-- show tbl1 fulltext_index segment 0'
280
+ curl --request GET \
281
+ --url http://localhost:23820/databases/default_db/tables/tbl1/indexes/fulltext_index/segment/0 \
282
+ --header ' accept: application/json'
283
+
284
+ # show table tbl1 fulltext_index segment 0 chunk 0
285
+ echo -e ' \n\n-- show tbl1 fulltext_index segment 0 chunk 0'
286
+ curl --request GET \
287
+ --url http://localhost:23820/databases/default_db/tables/tbl1/indexes/fulltext_index/segment/0/chunk/0 \
288
+ --header ' accept: application/json'
289
+
290
+ # show table tbl1 secondary_index segment 0
291
+ echo -e ' \n\n-- show tbl1 secondary_index segment 0'
292
+ curl --request GET \
293
+ --url http://localhost:23820/databases/default_db/tables/tbl1/indexes/secondary_index/segment/0 \
294
+ --header ' accept: application/json'
295
+
296
+ # show table tbl1 secondary_index segment 0 chunk 0
297
+ echo -e ' \n\n-- show tbl1 secondary_index segment 0 chunk 0'
298
+ curl --request GET \
299
+ --url http://localhost:23820/databases/default_db/tables/tbl1/indexes/secondary_index/segment/0/chunk/0 \
300
+ --header ' accept: application/json'
301
+
302
+ # show table tbl1 bmp_index segment 0
303
+ echo -e ' \n\n-- show tbl1 bmp_index segment 0'
304
+ curl --request GET \
305
+ --url http://localhost:23820/databases/default_db/tables/tbl1/indexes/bmp_index/segment/0 \
306
+ --header ' accept: application/json'
307
+
308
+ # show table tbl1 bmp_index segment 0 chunk 0
309
+ echo -e ' \n\n-- show tbl1 bmp_index segment 0 chunk 0'
310
+ curl --request GET \
311
+ --url http://localhost:23820/databases/default_db/tables/tbl1/indexes/bmp_index/segment/0/chunk/0 \
312
+ --header ' accept: application/json'
313
+
206
314
# drop tbl1 hnsw_index
207
315
echo -e ' \n\n-- drop tbl1 hnsw_index'
208
316
curl --request DELETE \
0 commit comments