Vector field with index_missing=True cannot be created
Maintainer thường phản hồi trong vòng 5 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 431
- Fork
- 107
- Merge trung bình
- 5 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của redis/redis-vl-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
redis/redis-vl-python#773 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Add Python 3.15 supportCó thể đã có người làm @vishal-bala đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
redis/redis-vl-python#757 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 5 ngày
-
SearchIndex.drop_keys does not validate cluster hash-tag co-location (inconsistent with drop_documents)Có thể đã có người làm @Hashim1999164 đã nhận hôm nay. Đang mởbug good first issue index
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
redis/redis-vl-python#601 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
redis/redis-vl-python#300 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Migration executor cannot read an FT.AGGREGATE cursor over a RESP3 connection, raising KeyErrorCó thể đã có người làm @Kuang-xianxin đã nhận 42 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
redis/redis-vl-python#714 ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của redis/redis-vl-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SwiftKickMobile/skai#84 ·
-
Lychee link check failedĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
jxxghp/MoviePilot#7070 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
flop-labs/technocore-chat#997 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tunneld on Windows: Wi-Fi devices are not discovered because uvicorn runs on a ProactorEventLoopĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
doronz88/pymobiledevice3#2051 ·
Maintainer thường phản hồi trong vòng 1 ngày