From 1842c8b6967b2cdaefcb0bd81876bfe5ad8b1f5d Mon Sep 17 00:00:00 2001 From: AndyVerne <651264571@qq.com> Date: Wed, 28 Aug 2024 17:18:10 +0800 Subject: [PATCH] Update hybrid_search_with_milvus.md Compressed Sparse Row sparse array Do Not support slice like `query_embeddings["sparse"][0]`, we should correct it to `query_embeddings["sparse"][0]._getrow(0)` --- site/en/tutorials/hybrid_search_with_milvus.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/en/tutorials/hybrid_search_with_milvus.md b/site/en/tutorials/hybrid_search_with_milvus.md index 7a24a94dd..8391956c3 100644 --- a/site/en/tutorials/hybrid_search_with_milvus.md +++ b/site/en/tutorials/hybrid_search_with_milvus.md @@ -246,11 +246,11 @@ Let's run three different searches with defined functions: ```python dense_results = dense_search(col, query_embeddings["dense"][0]) -sparse_results = sparse_search(col, query_embeddings["sparse"][0]) +sparse_results = sparse_search(col, query_embeddings["sparse"]._getrow(0)) hybrid_results = hybrid_search( col, query_embeddings["dense"][0], - query_embeddings["sparse"][0], + query_embeddings["sparse"]._getrow(0), sparse_weight=0.7, dense_weight=1.0, )