FlagEmbedding icon indicating copy to clipboard operation
FlagEmbedding copied to clipboard

hybrid_search对于sparse向量的长度有什么要求吗?

Open Mycroft-s opened this issue 1 year ago • 3 comments

在milvus数据库中运行hybrid_search方法的时候,出现了以下报错:pymilvus.exceptions.MilvusException: <MilvusException: (code=1, message=Unexpected error, message=<sparse array length is ambiguous; use getnnz() or shape[0]>)> 但我看milvus中使用hybrid_search的示例里面也没有对sparse的长度做什么要求呀,还是有可能因为嵌入出现问题,导致无法找到sparse向量的长度

Mycroft-s avatar Apr 30 '24 03:04 Mycroft-s

建议询问Milvus团队,不清楚这个问题

staoxiao avatar Apr 30 '24 14:04 staoxiao

I have the same issue. @Mycroft-s , did you find a reason why this error occurs yet?

Translated: 我也有同样的问题。@Mycroft-s ,你找到这个错误发生的原因了吗?


Edit: I found the error in my case. Instead of a single sparse query vector I passed the list of sparse query vectors to the corresponding AnnSearchRequest.

编辑:我在我的案例中找到了错误。我传递了一组稀疏查询向量到相应的AnnSearchRequest,而不是单个稀疏查询向量。

dorian-grosch avatar Jan 13 '25 13:01 dorian-grosch

你放入了一个问题list

xiaoheiNLP avatar Mar 13 '25 06:03 xiaoheiNLP