From 2c4c997f4a4421574885bab056b27e2d31edfe6e Mon Sep 17 00:00:00 2001 From: hyun Date: Mon, 17 Apr 2023 14:07:24 +0800 Subject: [PATCH] bug: fix default search_param in milvus.py --- haystack/document_stores/milvus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/haystack/document_stores/milvus.py b/haystack/document_stores/milvus.py index 38d09dc9ea..59ece5d743 100644 --- a/haystack/document_stores/milvus.py +++ b/haystack/document_stores/milvus.py @@ -112,7 +112,7 @@ def __init__( For example: {"nlist": 16384} as the number of cluster units to create for index_type IVF_FLAT. See https://milvus.io/docs/v2.0.x/index.md :param search_param: Configuration parameters for the chose index_type needed at query time - For example: {"nprobe": 10} as the number of cluster units to query for index_type IVF_FLAT. + For example: {"params": {"nprobe": 10}} as the number of cluster units to query for index_type IVF_FLAT. See https://milvus.io/docs/v2.0.x/index.md :param return_embedding: To return document embedding. :param embedding_field: Name of field containing an embedding vector. @@ -171,7 +171,7 @@ def __init__( self.index_type = index_type self.index_param = index_param or {"nlist": 16384} - self.search_param = search_param or {"nprobe": 10} + self.search_param = search_param or {"params": {"nprobe": 10}} self.index = index self.embedding_field = embedding_field self.id_field = id_field