mirror of https://github.com/milvus-io/milvus.git
[skip ci] Remove unused code of benchmark (#10025)
Signed-off-by: wangting0128 <ting.wang@zilliz.com>pull/10039/head
parent
946cf3f286
commit
2601a6aaf0
|
@ -305,17 +305,17 @@ class MilvusClient(object):
|
|||
def query(self, vector_query, filter_query=None, collection_name=None, timeout=300):
|
||||
""" This method corresponds to the search method of milvus """
|
||||
tmp_collection_name = self._collection_name if collection_name is None else collection_name
|
||||
must_params = [vector_query]
|
||||
if filter_query:
|
||||
must_params.extend(filter_query)
|
||||
query = {
|
||||
"bool": {"must": must_params}
|
||||
}
|
||||
|
||||
params = util.search_param_analysis(vector_query, filter_query)
|
||||
params.update({"timeout": timeout})
|
||||
result = self._milvus.search(tmp_collection_name, **params)
|
||||
|
||||
# must_params = [vector_query]
|
||||
# if filter_query:
|
||||
# must_params.extend(filter_query)
|
||||
# query = {
|
||||
# "bool": {"must": must_params}
|
||||
# }
|
||||
# result = self._milvus.search(tmp_collection_name, query, timeout=timeout)
|
||||
return result
|
||||
|
||||
|
|
Loading…
Reference in New Issue