|
@@ 161-175 (lines=15) @@
|
| 158 |
|
assert False, str(e) |
| 159 |
|
# TODO: |
| 160 |
|
|
| 161 |
|
def test_list_id_in_segment_with_index_B(self, connect, collection, get_simple_index): |
| 162 |
|
''' |
| 163 |
|
target: get vector ids when there is index and with partition |
| 164 |
|
method: create partition, add vectors to it and call list_id_in_segment, check if the segment contains vectors |
| 165 |
|
expected: status ok |
| 166 |
|
''' |
| 167 |
|
connect.create_partition(collection, tag) |
| 168 |
|
ids = connect.insert(collection, entities, partition_tag=tag) |
| 169 |
|
connect.flush([collection]) |
| 170 |
|
stats = connect.get_collection_stats(collection) |
| 171 |
|
assert stats["partitions"][1]["tag"] == tag |
| 172 |
|
try: |
| 173 |
|
connect.list_id_in_segment(collection, stats["partitions"][1]["segments"][0]["id"]) |
| 174 |
|
except Exception as e: |
| 175 |
|
assert False, str(e) |
| 176 |
|
# vector_ids should match ids |
| 177 |
|
# TODO |
| 178 |
|
|
|
@@ 352-363 (lines=12) @@
|
| 349 |
|
vector_ids = connect.list_id_in_segment(jac_collection, seg_id) |
| 350 |
|
# TODO: |
| 351 |
|
|
| 352 |
|
def test_list_id_in_segment_with_index_B(self, connect, jac_collection, get_jaccard_index): |
| 353 |
|
''' |
| 354 |
|
target: get vector ids when there is index and with partition |
| 355 |
|
method: create partition, add vectors to it and call list_id_in_segment, check if the segment contains vectors |
| 356 |
|
expected: status ok |
| 357 |
|
''' |
| 358 |
|
connect.create_partition(jac_collection, tag) |
| 359 |
|
ids = connect.insert(jac_collection, entities, partition_tag=tag) |
| 360 |
|
connect.flush([jac_collection]) |
| 361 |
|
stats = connect.get_collection_stats(jac_collection) |
| 362 |
|
assert stats["partitions"][1]["tag"] == tag |
| 363 |
|
vector_ids = connect.list_id_in_segment(jac_collection, stats["partitions"][1]["segments"][0]["id"]) |
| 364 |
|
# vector_ids should match ids |
| 365 |
|
# TODO |
| 366 |
|
|
|
@@ 258-269 (lines=12) @@
|
| 255 |
|
vector_ids = connect.list_id_in_segment(ip_collection, seg_id) |
| 256 |
|
# TODO: |
| 257 |
|
|
| 258 |
|
def test_list_id_in_segment_with_index_B(self, connect, ip_collection, get_simple_index): |
| 259 |
|
''' |
| 260 |
|
target: get vector ids when there is index and with partition |
| 261 |
|
method: create partition, add vectors to it and call list_id_in_segment, check if the segment contains vectors |
| 262 |
|
expected: status ok |
| 263 |
|
''' |
| 264 |
|
connect.create_partition(ip_collection, tag) |
| 265 |
|
ids = connect.insert(ip_collection, entities, partition_tag=tag) |
| 266 |
|
connect.flush([ip_collection]) |
| 267 |
|
stats = connect.get_collection_stats(ip_collection) |
| 268 |
|
assert stats["partitions"][1]["tag"] == tag |
| 269 |
|
vector_ids = connect.list_id_in_segment(ip_collection, stats["partitions"][1]["segments"][0]["id"]) |
| 270 |
|
# vector_ids should match ids |
| 271 |
|
# TODO |
| 272 |
|
|