fix: fix default m (#20)

* fix: fix default m

* fix doc str

* fix ut
This commit is contained in:
egolearner
2026-01-12 10:22:58 +08:00
committed by GitHub
parent 6d11623a96
commit 89f9c378ac
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ class TestHnswIndexParam:
def test_default(self):
param = HnswIndexParam()
assert param.metric_type == MetricType.IP
assert param.m == 100
assert param.m == 50
assert param.ef_construction == 500
assert param.quantize_type == QuantizeType.UNDEFINED
assert param.type == IndexType.HNSW
+1 -1
View File
@@ -165,7 +165,7 @@ class TestCollectionSchema:
assert vector.data_type == DataType.VECTOR_INT8
assert vector.dimension == 128
assert vector.index_param.type == IndexType.HNSW
assert vector.index_param.m == 100
assert vector.index_param.m == 50
assert vector.index_param.ef_construction == 500
assert vector.index_param.metric_type == MetricType.IP
+2 -2
View File
@@ -189,7 +189,7 @@ class HnswIndexParam(VectorIndexParam):
Default is ``MetricType.IP`` (inner product).
m (int): Number of bi-directional links created for every new element
during construction. Higher values improve accuracy but increase
memory usage and construction time. Default is 100.
memory usage and construction time. Default is 50.
ef_construction (int): Size of the dynamic candidate list for nearest
neighbors during index construction. Larger values yield better
graph quality at the cost of slower build time. Default is 500.
@@ -272,7 +272,7 @@ class HnswQueryParam(QueryParam):
Args:
ef (int, optional): Search-time candidate list size.
Higher values improve accuracy. Defaults to 100.
Higher values improve accuracy. Defaults to 300.
radius (float, optional): Search radius for range queries. Default is 0.0.
is_linear (bool, optional): Force linear search. Default is False.
is_using_refiner (bool, optional): Whether to use refiner for the query. Default is False.