[skip ci] Update search interface imput params on benchmark (#9950)

Signed-off-by: wangting0128 <ting.wang@zilliz.com>
pull/9934/head
wt 2021-10-15 15:30:42 +08:00 committed by GitHub
parent 68df636711
commit 02c4f3aa0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 3 deletions

View File

@ -311,7 +311,12 @@ class MilvusClient(object):
query = {
"bool": {"must": must_params}
}
result = self._milvus.search(tmp_collection_name, query, timeout=timeout)
params = util.search_param_analysis(vector_query, filter_query)
params.update({"timeout": timeout})
result = self._milvus.search(tmp_collection_name, **params)
# result = self._milvus.search(tmp_collection_name, query, timeout=timeout)
return result
@time_wrapper
@ -330,7 +335,10 @@ class MilvusClient(object):
}
logger.debug("Start warm up query")
for i in range(times):
self._milvus.search(self._collection_name, query)
params = util.search_param_analysis(vector_query, None)
result = self._milvus.search(self._collection_name, **params)
# self._milvus.search(self._collection_name, query)
logger.debug("End warm up query")
@time_wrapper
@ -343,7 +351,12 @@ class MilvusClient(object):
"bool": {"must": must_params}
}
self.load_collection(tmp_collection_name)
result = self._milvus.search(tmp_collection_name, query, timeout=timeout)
params = util.search_param_analysis(vector_query, filter_query)
params.update({"timeout": timeout})
result = self._milvus.search(tmp_collection_name, **params)
# result = self._milvus.search(tmp_collection_name, query, timeout=timeout)
return result
def get_ids(self, result):