test: add VectorField RERANK serialization tests for sync and async search - #4202
Merged
Conversation
vladvildanov
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change summary
This pull request adds serialization coverage for the
RERANKattribute onVectorField, which had no dedicated test.RERANKis a boolean key-valueattribute for HNSW vector fields on disk-backed (Flex / Auto-Tiering)
deployments; the tests verify it flows through the
attributesdict as thestring
"TRUE"/"FALSE"and produces a well-formedFT.CREATEargument 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_clientand need no Redis server; the asynccopy is intentionally a plain (non-
async)def. Sync/async parity is preserved.Test coverage
Adds a mirrored
test_vector_field_rerankin both suites. Each constructs aVectorField("v", "HNSW", {...})withRERANKset to"TRUE"and"FALSE",then asserts the type/algorithm tokens, the attribute-count token (4 pairs → 8),
and that
RERANKand its value appear infield.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_rerankcoverage in sync and async search suites for the HNSWRERANKindex attribute (disk-backed Flex / Auto-Tiering), which had no dedicated test before.Each test is marked
fixed_clientand only inspectsVectorField(...).args—no Redis server—assertingVECTOR/HNSW, the attribute-count token (4 pairs → 8), and thatRERANKappears 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.