通过全文搜索方式创建的稀疏向量搜不出数据 #42648
ZzLin1001
started this conversation in
Show and tell
Replies: 2 comments 9 replies
-
|
Beta Was this translation helpful? Give feedback.
1 reply
-
通过BM25 Function产生的sparse向量并不会显示在attu里,可以通过schema看到这个sparse vector字段,但不会显示它的数据,这是设计上如此。 |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
你好,请教一下,我按照文档方式创建了BM25的稀疏向量,但是在attu里看不到数据,也检索不出东西。
创建collection代码如下:
def create_collection(milvus_cmd: MilvusCmd):
# ===== 1. 创建 Schema =====
# client = MilvusClient("./milvus_demo.db")
# 3.1. Create schema
if milvus_cmd.collection_name is None:
raise Exception('Milvus collection name is missing')
创建出来之后,collection的schema是可以看到sparse_vector的,但是看不到数据列和数据:


按文档描述,只要chunk_text插入成功了,稀疏向量就应该同时写入了对吧?但是为什么看不见sparse_vector这个field,也没有数据呢?
我尝试以原文去搜,也搜不出来,代码如下:
def sparse_recall():
但是chunk和原文是存在的,当我全量query的时候:

请问是我理解不对吗?milvus自带的稀疏向量搜索是怎么使用的?
我用的版本是 pymilvus==2.5.5
麻烦帮我看下,谢谢!
Beta Was this translation helpful? Give feedback.
All reactions