Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

from_existing fails on SVS-VAMANA indexes created without compression

オープン 初心者向け
#787 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

@itsrayeedscodespace がすでに取り組んでいます。

2026年10月27日 から。

  • #790 @itsrayeedscodespace による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, redis
領域
backend, databases

調査の方向性

redisvl/redis/connection.py の compression_mapping ブロックから始め、その出力が IndexSchema の構築にどう使われるかを追ってください。issue にある FT.INFO の形式を使った単体テストを追加し、NO_COMPRESSION によって compression 属性のない SVS フィールドが生成されることを確認してください。このケースでスキーマが正常に読み込まれれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug index

Description

SearchIndex.from_existing fails on any SVS-VAMANA index created without compression.

For such a field, FT.INFO reports compression NO_COMPRESSION. Measured on Redis 8.2.7, 8.4.7 and 8.10.0, for both HASH and JSON storage. convert_index_info_to_schema maps only GlobalSQ8 and GlobalSQ4 and passes any other value through unchanged (redisvl/redis/connection.py, the compression_mapping block). CompressionType accepts only the LVQ and LeanVec values, so building the schema raises a ValidationError and the index cannot be loaded at all.

Reproduction

This uses the field as FT.INFO returns it, so it needs no server:

from redisvl.redis.connection import convert_index_info_to_schema
from redisvl.schema import IndexSchema

info = {
    "index_name": "svs",
    "index_definition": {"key_type": "HASH", "prefixes": ["svs"]},
    "attributes": [{
        "identifier": "emb", "attribute": "emb", "type": "VECTOR",
        "algorithm": "SVS-VAMANA", "data_type": "FLOAT32", "dim": 3,
        "distance_metric": "COSINE", "compression": "NO_COMPRESSION",
        "graph_max_degree": 32, "construction_window_size": 200,
    }],
}
IndexSchema.from_dict(convert_index_info_to_schema(info))
pydantic_core._pydantic_core.ValidationError: 1 validation error for IndexSchema
attrs.compression
  Input should be 'LVQ4', 'LVQ4x4', 'LVQ4x8', 'LVQ8', 'LeanVec4x8' or 'LeanVec8x8' [type=enum, input_value='NO_COMPRESSION', input_type=str]

Expected behaviour

from_existing returns a schema whose SVS field has no compression attribute, matching how the index was created.

Proposed fix

Treat NO_COMPRESSION as the absence of compression and omit the key. A unit test built from the FT.INFO shape above would cover it.

主要言語
Python
スター
432
フォーク
116
平均マージ
5日 22時間
マージ済み PR(30日)
13

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

redis/redis-vl-python のほかの issue

redis/redis-vl-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。