Vector field with index_missing=True cannot be created
维护者通常 5 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
调研方向
Start by reading BaseVectorFieldAttributes.field_data and the vector field construction path used by SearchIndex.create(); compare that with how redis-py’s VectorField accepts index_missing=True on the field constructor. Check the existing vector field tests for HNSW, flat, and svs-vamana. Done means index creation succeeds with index_missing: True and ismissing(@emb) matches documents without the field.
由索引模型根据 Issue 内容生成。
描述
Description
A vector field declared with index_missing: True makes SearchIndex.create() fail. The same review thread on #742 noted this, and the from_existing parser skips INDEXMISSING on vector fields for this reason.
BaseVectorFieldAttributes.field_data adds "INDEXMISSING": True to the algorithm attribute dict. redis-py's VectorField counts and sends every dict entry inside the attribute block, so:
- The client rejects the Python
boolbefore sending:Invalid input of type: 'bool'. - Even as a string, the server rejects the token inside the block:
Bad arguments for algorithm HNSW: INDEXMISSING.
FT.CREATE expects INDEXMISSING after the attribute block, which is where redis-py puts it when you pass index_missing=True to the field constructor.
Reproduction
Redis 8.4, redis-py 8.1.0, RedisVL main (e5d7598):
from redisvl.index import SearchIndex
schema = {
"index": {"name": "im", "prefix": "im", "storage_type": "hash"},
"fields": [
{"name": "id", "type": "tag"},
{"name": "emb", "type": "vector",
"attrs": {"dims": 3, "algorithm": "hnsw", "index_missing": True}},
],
}
SearchIndex.from_dict(schema, redis_url="redis://localhost:6379").create()
redisvl.exceptions.RedisSearchError: Failed to create index 'im' on Redis:
Invalid input of type: 'bool'. Convert to a bytes, string, int or float first.
The same happens with flat and svs-vamana.
Expected behavior
The index is created with INDEXMISSING on the vector field, and ismissing(@emb) matches documents without the field.
- 主要语言
- Python
- 星标
- 431
- 派生
- 107
- 平均合并
- 5 天 17 小时
- 30 天内合并 PR
- 16
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
redis/redis-vl-python 的其他 Issue
-
exists() depends on exact FT.INFO error wording; an unrecognised "missing index" message makes create() never create the index (regression from #672)可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
redis/redis-vl-python#773 ·
维护者通常 5 天内回复
-
Add Python 3.15 support可能已有人在做 @vishal-bala 于 4 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
redis/redis-vl-python#757 · 1 条评论 · 1 个 reaction ·
维护者通常 5 天内回复
-
SearchIndex.drop_keys does not validate cluster hash-tag co-location (inconsistent with drop_documents)可能已有人在做 @Hashim1999164 于 2 天前认领。 未关闭bug good first issue index
难度 2/5 1-3 小时 新手友好度 78/100
redis/redis-vl-python#601 ·
维护者通常 5 天内回复
-
documentation
难度 1/5 1 小时以内 新手友好度 62/100
redis/redis-vl-python#300 ·
维护者通常 5 天内回复
-
Migration executor cannot read an FT.AGGREGATE cursor over a RESP3 connection, raising KeyError可能已有人在做 @Kuang-xianxin 于 44 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
redis/redis-vl-python#714 ·
维护者通常 5 天内回复
查看 redis/redis-vl-python 的全部 Issue
相似的 Issue
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 82/100
selimfirat/pysad#379 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
open-webui/open-webui#32805 ·
维护者通常 1 天内回复
-
fix: [bug description] HTML CVE metric table shows only the last CVE for each product可能已有人在做 @Chris-wh233 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 66/100
ossf/cve-bin-tool#5976 ·
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 72/100
gke-labs/kube-agents#3615 ·
维护者通常 1 天内回复
-
deferred
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复