Skip to content

fix: handle uncompressed SVS-VAMANA indexes - #790

Open
itsrayeedscodespace wants to merge 1 commit into
redis:mainfrom
itsrayeedscodespace:fix/issue-787
Open

itsrayeedscodespace wants to merge 1 commit into
redis:mainfrom
itsrayeedscodespace:fix/issue-787

Conversation

@itsrayeedscodespace

@itsrayeedscodespace itsrayeedscodespace commented Oct 27, 2026 •

Copy link
Copy Markdown

Issue Link

Closes #787

Description

Fixes an issue where SearchIndex.from_existing() and AsyncSearchIndex.from_existing() fail to reconstruct SVS-VAMANA indexes created without compression.

Redis returns NO_COMPRESSION in FT.INFO, which previously caused a Pydantic validation error during schema reconstruction.

The fix treats NO_COMPRESSION as an omitted compression setting while preserving existing supported compression mappings.

Testing

Added regression coverage for HASH and JSON indexes, multiple FT.INFO response formats, and existing compression options.

Validation:

  • Targeted tests: 73 passed.
  • Full unit suite: 1,866 passed, 11 skipped.
  • Live Redis 8.4.8: 8/8 recovery checks passed across HASH/JSON, RESP2/RESP3, and sync/async.
  • Formatting, import sorting, mypy and lockfile checks passed.
  • Separate Pylint check reported pre-existing configuration and code diagnostics (8.79/10).

Six regression cases reproduced the original validation error before the fix and passed afterward.

No public API changes or unrelated source modifications.

Release Notes

Existing SVS-VAMANA indexes created without compression can now be loaded successfully.

Reviewer Brief

Start here: redisvl/redis/connection.py:516, convert_index_info_to_schema(): omitting Redis's no-compression sentinel lets both sync and async from_existing() validate the recovered SVS schema.

Where it could fail

  • redisvl/redis/connection.py:518: check that only NO_COMPRESSION is omitted; explicit compression mappings and JSON field paths must survive reconstruction.

Not verified: live SVS recovery, cluster mode, other Redis/Python versions, full suite and provider APIs were not rerun in this review; tests used Python 3.13.12 and synthetic FT.INFO replies. The repository fixture started Redis, but these tests do not query it. Redis docs confirm compression defaults to none but do not specify the literal sentinel; earlier validation claims above are author-provided history.

Beyond CI: running the new matrix directly against the upstream merge-base converter produced six sentinel ValidationErrors and 54 passes; HEAD passed all 60 cases, without modifying source files.

Reviewed 3144e0472bfaea705e66748d65eea19924ee66d6 · Codex (GPT-6; exact runtime model ID unavailable) · lenses: correctness, security, design, tests, docs, Redis behaviour


Note

Low Risk
Narrow change to FT.INFO→schema conversion for SVS compression only; behavior for explicit compression mappings is unchanged.

Overview
Fixes SearchIndex.from_existing() / AsyncSearchIndex.from_existing() failing when rebuilding SVS-VAMANA indexes that were created without compression.

Redis FT.INFO reports NO_COMPRESSION for those indexes; convert_index_info_to_schema used to pass that through and trigger Pydantic validation on compression. The converter now ignores NO_COMPRESSION (same as a missing compression setting) while keeping existing Redis→enum mappings (GlobalSQ8 → LVQ4x4, etc.).

Adds parametrized unit tests for HASH/JSON storage, dict/list/flags FT.INFO shapes, NO_COMPRESSION/omitted compression, and supported compression values—including that uncompressed indexes omit compression from the recovered schema and Redis field args.

Reviewed by Cursor Bugbot for commit 3144e04. Bugbot is set up for automated code reviews on this repo. Configure here.

@vishal-bala vishal-bala left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for your contribution - please follow the pre-PR review guidelines outlined in CONTRIBUTING.md. We will wait until the PR has the expected "Reviewer Brief" section before assigning a human reviewer to it.

@itsrayeedscodespace

Copy link
Copy Markdown
Author

Hi, thanks for the guidance! I've completed the pre-PR review following the repository's guidelines and added the Reviewer Brief to the PR description.

The review covered all six areas, with no additional code changes needed. I've also included the remaining limitations and validation evidence.

Appreciate your time, and looking forward to your feedback!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

from_existing fails on SVS-VAMANA indexes created without compression

2 participants