Skip to content

[Bug]: API 文档与实现不一致(FullTextIndexParam / MultiQuery 等) #562

Description

@laolaola278-dev

问题描述

Zvec v0.5.1 的 README / API 文档与 Python 实际 API 存在多处不一致,给开发者带来困惑。

具体问题

1. FullTextIndexParam 不存在,实际叫 FtsIndexParam

文档中使用的名称:
\\python
zvec.FullTextIndexParam()
\\

实际代码中:
\\python
zvec.FtsIndexParam() # 正确
\\

\FullTextIndexParam\ 会报 AttributeError。

2. MultiQuery 不存在

文档提到 \MultiQuery\ 用于多向量搜索,但实际 API 中不存在这个类。

实际用法是传入 \list[Query]\ 并配合
eranker\ 参数:

\\python
collection.query(
queries=[q1, q2],
topk=10,
reranker=zvec.RrfReRanker()
)
\\

3. 缺少 \DataType\ 枚举值的文档说明

\zvec.DataType\ 有哪些可用值没有明确文档,开发者需要读源码才能知道支持 STRING、INT64、VECTOR_FP32 等。

4. Query 返回的 Doc 对象属性文档不足

搜索结果返回的 Doc 对象中:

  • \doc.score\ — 文档有说明
  • \doc.fields\ — 字典格式,文档有说明
  • \doc.vectors\ — 字典格式,文档未明确说明

建议

  1. 更新 README 中的代码示例,统一使用 \FtsIndexParam\
  2. 补充或移除 \MultiQuery\ 的文档,说明正确的多向量搜索方式
  3. 补充 \DataType\ 枚举值的说明
  4. 补充 Doc 返回对象的 vectors 属性文档

环境

  • Zvec v0.5.1(pip 安装)
  • Windows 10 x64
  • Python 3.11

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions