Kazel
commited on
Commit
·
26b5c93
1
Parent(s):
4e5cbca
change
Browse files- milvus_manager.py +3 -6
milvus_manager.py
CHANGED
@@ -50,13 +50,10 @@ class MilvusManager:
|
|
50 |
|
51 |
index_params.add_index(
|
52 |
field_name="vector",
|
|
|
|
|
53 |
index_name="vector_index",
|
54 |
-
|
55 |
-
metric_type=os.environ["metrictype"], #"IP"
|
56 |
-
params={
|
57 |
-
"M": int(os.environ["mnum"]), #M:16 for HNSW, capital M
|
58 |
-
"efConstruction": int(os.environ["efnum"]), #500 for HNSW
|
59 |
-
},
|
60 |
)
|
61 |
|
62 |
self.client.create_index(
|
|
|
50 |
|
51 |
index_params.add_index(
|
52 |
field_name="vector",
|
53 |
+
metric_type="COSINE",
|
54 |
+
index_type="IVF_FLAT",
|
55 |
index_name="vector_index",
|
56 |
+
params={ "nlist": 128 }
|
|
|
|
|
|
|
|
|
|
|
57 |
)
|
58 |
|
59 |
self.client.create_index(
|