...
如下图所示,在 search_params.params 中加入 "radius": 888
Code Block | ||
---|---|---|
| ||
default_index = {"index_type": "HNSW", "params":{"M": 48, "efConstruction": 500}, "metric_type": "L2"} collection.create_index("float_vector", default_index) collection.load() search_params = {"metric_type": "L2", "params": {"ef": 32, "radius": 888}} res = colcollection.search(vectors[:nq], "float_vector", search_params, limit, "int64 >= 0") |
...