from_existing fails on SVS-VAMANA indexes created without compression
メンテナーはふだん 4 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 84/100
調査の方向性
redisvl/redis/connection.py の compression_mapping ブロックから始め、その出力が IndexSchema の構築にどう使われるかを追ってください。issue にある FT.INFO の形式を使った単体テストを追加し、NO_COMPRESSION によって compression 属性のない SVS フィールドが生成されることを確認してください。このケースでスキーマが正常に読み込まれれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
redis/redis-vl-python のほかの issue
-
RedisVL warnings are never shown when the application has not configured logging対応中かも @hippi345 が 2 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
redis/redis-vl-python#786 ·
メンテナーはふだん 4 日以内に返信
-
exists() depends on exact FT.INFO error wording; an unrecognised "missing index" message makes create() never create the index (regression from #672)再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
redis/redis-vl-python#773 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
Vector field with index_missing=True cannot be created対応中かも @RaphaelFakhri が 12 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
redis/redis-vl-python#770 ·
メンテナーはふだん 4 日以内に返信
-
Add Python 3.15 support対応中かも @vishal-bala が 13 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
redis/redis-vl-python#757 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 4 日以内に返信
-
SearchIndex.drop_keys does not validate cluster hash-tag co-location (inconsistent with drop_documents)対応中かも @Hashim1999164 が 11 日前に担当しました。 オープンbug good first issue index
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
redis/redis-vl-python#601 ·
メンテナーはふだん 4 日以内に返信
redis/redis-vl-python の issue をすべて見る
似ている issue
-
priority middle
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
KATO-Hiro/AtCoderClans#12940 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
huggingface/huggingface_hub#5283 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
bug example
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信