Skip to content

test: add VectorField RERANK serialization tests for sync and async search - #4202

Merged
petyaslavova merged 2 commits into
masterfrom
ps_add_rerank_tests
Jul 21, 2026
Merged

test: add VectorField RERANK serialization tests for sync and async search#4202
petyaslavova merged 2 commits into
masterfrom
ps_add_rerank_tests

Conversation

@petyaslavova

@petyaslavova petyaslavova commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Change summary

This pull request adds serialization coverage for the RERANK attribute on
VectorField, which had no dedicated test. RERANK is a boolean key-value
attribute for HNSW vector fields on disk-backed (Flex / Auto-Tiering)
deployments; the tests verify it flows through the attributes dict as the
string "TRUE"/"FALSE" and produces a well-formed FT.CREATE argument vector.

Changes are test-only (tests/test_search.py, tests/test_asyncio/test_search.py),
so there is no runtime, public-API, or wire-protocol impact. The tests are pure
serialization checks marked fixed_client and need no Redis server; the async
copy is intentionally a plain (non-async) def. Sync/async parity is preserved.

Test coverage

Adds a mirrored test_vector_field_rerank in both suites. Each constructs a
VectorField("v", "HNSW", {...}) with RERANK set to "TRUE" and "FALSE",
then asserts the type/algorithm tokens, the attribute-count token (4 pairs → 8),
and that RERANK and its value appear in field.args. No product code changed.


Note

Low Risk
Changes are limited to new unit tests with no production code, API, or protocol impact.

Overview
Adds mirrored test_vector_field_rerank coverage in sync and async search suites for the HNSW RERANK index attribute (disk-backed Flex / Auto-Tiering), which had no dedicated test before.

Each test is marked fixed_client and only inspects VectorField(...).args—no Redis server—asserting VECTOR/HNSW, the attribute-count token (4 pairs → 8), and that RERANK appears with "TRUE" or "FALSE" from the attributes dict. No library or runtime code changes.

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

@petyaslavova petyaslavova added the maintenance Maintenance (CI, Releases, etc) label Jul 20, 2026
@petyaslavova
petyaslavova merged commit 71e275e into master Jul 21, 2026
1092 of 1094 checks passed
@petyaslavova
petyaslavova deleted the ps_add_rerank_tests branch July 21, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Maintenance (CI, Releases, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants