diff --git a/tests/benchmark/milvus_benchmark/client.py b/tests/benchmark/milvus_benchmark/client.py index 9e1fffde25..1d137c5a1f 100644 --- a/tests/benchmark/milvus_benchmark/client.py +++ b/tests/benchmark/milvus_benchmark/client.py @@ -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):