Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

from_existing fails on SVS-VAMANA indexes created without compression

Aperta Adatta ai principianti
#787 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

@itsrayeedscodespace ci sta già lavorando.

Dal 27/10/2026.

  • #790 di @itsrayeedscodespace — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python, redis
Ambito
backend, databases

Direzione di ricerca

Inizia dal blocco compression_mapping in redisvl/redis/connection.py e segui come il suo output viene usato per creare un IndexSchema. Aggiungi un test unitario usando la struttura di FT.INFO indicata nell’issue, quindi verifica che NO_COMPRESSION produca un campo SVS senza attributo compression. Il lavoro è completato quando lo schema viene caricato correttamente per questo caso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
432
Fork
111
Merge medio
5g 22h
PR unite (30g)
13

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di redis/redis-vl-python

Tutte le issue di redis/redis-vl-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.