Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Vector field with index_missing=True cannot be created

Đang mở Phù hợp với người mới
#770 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 5 ngày

@RaphaelFakhri đang làm issue này rồi.

Từ ngày 17/10/2026.

  • #771 của @RaphaelFakhri — đang mở

Đá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
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, redis
Lĩnh vực
backend, databases

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:

  1. The client rejects the Python bool before sending: Invalid input of type: 'bool'.
  2. 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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của redis/redis-vl-python

Tất cả issue của redis/redis-vl-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.