[test]Not output vector field for sq pq index (#24912)

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
zhuwenxing 2023-06-19 18:48:44 +08:00 committed by GitHub
parent d51e1379fe
commit a6310050c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -244,7 +244,10 @@ def load_and_search(prefix, replicas=1):
logger.info("search latency: %.4fs" % (end_time - start_time))
t0 = time.time()
expr = "count in [2,4,6,8]"
output_fields = ["count", "random_value", "float_vector"]
if "SQ" in col_name or "PQ" in col_name:
output_fields = ["count", "random_value"]
else:
output_fields = ["count", "random_value", "float_vector"]
res = c.query(expr, output_fields, timeout=120)
sorted_res = sorted(res, key=lambda k: k['count'])
for r in sorted_res: