[skip ci]Add query operation in e2e test script (#10920)

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
zhuwenxing 2021-10-29 20:05:15 +08:00 committed by GitHub
parent 20dac46730
commit f63df221c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,8 +82,13 @@ def hello_milvus(host="127.0.0.1"):
print(hit, hit.entity.get("random_value"))
print("search latency = %.4fs" % (end_time - start_time))
# drop collection
# collection.drop()
#query
expr = "count in [2,4,6,8]"
output_fields = ["count", "random_value"]
res = collection.query(expr, output_fields)
sorted_res = sorted(res, key=lambda k: k['count'])
for r in sorted_res:
print(r)
import argparse