logo
Browse Source

Add FLAT index

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
Jael Gu 2 years ago
parent
commit
44f1a4fec3
  1. 2
      milvus_client.py

2
milvus_client.py

@ -52,6 +52,7 @@ class MilvusClient(PyOperator):
self.kwargs['limit'] = 10
index_params = {
'FLAT': {'params': {'nprobe': 10}},
'IVF_FLAT': {'params': {'nprobe': 10}},
'IVF_SQ8': {'params': {'nprobe': 10}},
'IVF_PQ': {'params': {'nprobe': 10}},
@ -76,6 +77,7 @@ class MilvusClient(PyOperator):
self.kwargs['param']['metric_type'] = 'L2'
def __call__(self, query: 'ndarray'):
self._collection.load()
milvus_result = self._collection.search(
data=[query],
**self.kwargs

Loading…
Cancel
Save